diff --git a/pandas/tests/frame/test_repr_info.py b/pandas/tests/frame/test_repr_info.py index 48cf37a9abc8b..bfeacdd623b5f 100644 --- a/pandas/tests/frame/test_repr_info.py +++ b/pandas/tests/frame/test_repr_info.py @@ -137,6 +137,10 @@ def test_unicode_string_with_unicode(self): df = DataFrame({"A": ["\u05d0"]}) str(df) + def test_repr_unicode_columns(self): + df = DataFrame({"\u05d0": [1, 2, 3], "\u05d1": [4, 5, 6], "c": [7, 8, 9]}) + repr(df.columns) # should not raise UnicodeDecodeError + def test_str_to_bytes_raises(self): # GH 26447 df = DataFrame({"A": ["abc"]}) diff --git a/pandas/tests/indexes/ranges/test_range.py b/pandas/tests/indexes/ranges/test_range.py index 61ac937f5fda0..089daf3789ecd 100644 --- a/pandas/tests/indexes/ranges/test_range.py +++ b/pandas/tests/indexes/ranges/test_range.py @@ -353,10 +353,6 @@ def test_take_fill_value(self): with pytest.raises(IndexError): idx.take(np.array([1, -5])) - def test_print_unicode_columns(self): - df = pd.DataFrame({"\u05d0": [1, 2, 3], "\u05d1": [4, 5, 6], "c": [7, 8, 9]}) - repr(df.columns) # should not raise UnicodeDecodeError - def test_repr_roundtrip(self): index = self.create_index() tm.assert_index_equal(eval(repr(index)), index) diff --git a/pandas/tests/indexes/test_base.py b/pandas/tests/indexes/test_base.py index 5bdbc18769ce5..cf3c231c6b998 100644 --- a/pandas/tests/indexes/test_base.py +++ b/pandas/tests/indexes/test_base.py @@ -2437,10 +2437,6 @@ def test_int_name_format(self, klass): result = klass(list(range(3)), index=index) assert "0" in repr(result) - def test_print_unicode_columns(self): - df = pd.DataFrame({"\u05d0": [1, 2, 3], "\u05d1": [4, 5, 6], "c": [7, 8, 9]}) - repr(df.columns) # should not raise UnicodeDecodeError - def test_str_to_bytes_raises(self): # GH 26447 index = Index([str(x) for x in range(10)])