Skip to content

Commit 7231f52

Browse files
committed
change location of the test
1 parent ed8278e commit 7231f52

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

pandas/tests/frame/test_to_csv.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,12 @@ def test_to_csv_headers(self):
575575
recons.reset_index(inplace=True)
576576
tm.assert_frame_equal(to_df, recons)
577577

578+
def test_to_csv_raises_on_header_prefix():
579+
msg = "Argument prefix must be None if argument header is not None"
580+
with pytest.raises(ValueError, match=msg):
581+
s = StringIO("0,1\n2,3")
582+
read_csv(s, header=0, prefix="_X")
583+
578584
def test_to_csv_multiindex(self, float_frame, datetime_frame):
579585

580586
frame = float_frame

pandas/tests/io/parser/test_header.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,6 @@ def test_read_with_bad_header(all_parsers):
2424
parser.read_csv(s, header=[10])
2525

2626

27-
def test_read_raises_on_header_prefix(all_parsers):
28-
parser = all_parsers
29-
msg = "Argument prefix must be None if argument header is not None"
30-
with pytest.raises(ValueError, match=msg):
31-
s = StringIO("0,1\n2,3")
32-
parser.read_csv(s, header=0, prefix="_X")
33-
34-
3527
def test_negative_header(all_parsers):
3628
# see gh-27779
3729
parser = all_parsers

0 commit comments

Comments
 (0)