Skip to content

Commit e444e61

Browse files
authored
CLN: move misplaced (and duplicated) Dataframe.__repr__ test (#32968)
1 parent 4407d9f commit e444e61

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

pandas/tests/frame/test_repr_info.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,10 @@ def test_unicode_string_with_unicode(self):
137137
df = DataFrame({"A": ["\u05d0"]})
138138
str(df)
139139

140+
def test_repr_unicode_columns(self):
141+
df = DataFrame({"\u05d0": [1, 2, 3], "\u05d1": [4, 5, 6], "c": [7, 8, 9]})
142+
repr(df.columns) # should not raise UnicodeDecodeError
143+
140144
def test_str_to_bytes_raises(self):
141145
# GH 26447
142146
df = DataFrame({"A": ["abc"]})

pandas/tests/indexes/ranges/test_range.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -353,10 +353,6 @@ def test_take_fill_value(self):
353353
with pytest.raises(IndexError):
354354
idx.take(np.array([1, -5]))
355355

356-
def test_print_unicode_columns(self):
357-
df = pd.DataFrame({"\u05d0": [1, 2, 3], "\u05d1": [4, 5, 6], "c": [7, 8, 9]})
358-
repr(df.columns) # should not raise UnicodeDecodeError
359-
360356
def test_repr_roundtrip(self):
361357
index = self.create_index()
362358
tm.assert_index_equal(eval(repr(index)), index)

pandas/tests/indexes/test_base.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2437,10 +2437,6 @@ def test_int_name_format(self, klass):
24372437
result = klass(list(range(3)), index=index)
24382438
assert "0" in repr(result)
24392439

2440-
def test_print_unicode_columns(self):
2441-
df = pd.DataFrame({"\u05d0": [1, 2, 3], "\u05d1": [4, 5, 6], "c": [7, 8, 9]})
2442-
repr(df.columns) # should not raise UnicodeDecodeError
2443-
24442440
def test_str_to_bytes_raises(self):
24452441
# GH 26447
24462442
index = Index([str(x) for x in range(10)])

0 commit comments

Comments
 (0)