Skip to content

Commit 8e7635c

Browse files
author
Ben Kandel
committed
Modify test.
A test in test_to_csv checked for the presence of exactly the behavior we're fixing here: A file with 5 lines that asks for a header of length 5 should work and return an empty dataframe, not error.
1 parent 2cea978 commit 8e7635c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/tests/frame/test_to_csv.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ def _make_frame(names=None):
587587
df = _make_frame(True)
588588
df.to_csv(path, tupleize_cols=False)
589589

590-
for i in [5, 6, 7]:
590+
for i in [6, 7]:
591591
msg = 'len of {i}, but only 5 lines in file'.format(i=i)
592592
with assertRaisesRegexp(CParserError, msg):
593593
read_csv(path, tupleize_cols=False,

0 commit comments

Comments
 (0)