Skip to content

Commit 77c8ee0

Browse files
committed
change the location of the test
1 parent a003c51 commit 77c8ee0

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

pandas/tests/frame/test_to_csv.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ 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(self):
578+
def test_read_csv_raises_on_header_prefix(self):
579579
# gh-27394
580580
msg = "Argument prefix must be None if argument header is not None"
581581
s = StringIO("0,1\n2,3")

pandas/tests/io/parser/test_common.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,16 @@
1616
from pandas._libs.tslib import Timestamp
1717
from pandas.errors import DtypeWarning, EmptyDataError, ParserError
1818

19-
from pandas import DataFrame, Index, MultiIndex, Series, compat, concat
19+
from pandas import (
20+
DataFrame,
21+
Index,
22+
MultiIndex,
23+
Series,
24+
compat,
25+
concat,
26+
read_csv,
27+
)
28+
2029
import pandas._testing as tm
2130

2231
from pandas.io.parsers import CParserWrapper, TextFileReader, TextParser
@@ -2040,6 +2049,14 @@ def test_read_csv_memory_growth_chunksize(all_parsers):
20402049
pass
20412050

20422051

2052+
def test_read_csv_raises_on_header_prefix():
2053+
# gh-27394
2054+
msg = "Argument prefix must be None if argument header is not None"
2055+
s = StringIO("0,1\n2,3")
2056+
with pytest.raises(ValueError, match=msg):
2057+
read_csv(s, header=0, prefix="_X")
2058+
2059+
20432060
def test_read_table_equivalency_to_read_csv(all_parsers):
20442061
# see gh-21948
20452062
# As of 0.25.0, read_table is undeprecated

0 commit comments

Comments
 (0)