Skip to content

Commit 8b63525

Browse files
committed
Try writing to file name instead to get around python3 errors
1 parent 443eaf7 commit 8b63525

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

pandas/tests/io/parser/test_parsers.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,9 @@ def read_table(self, *args, **kwds):
104104

105105
class TestParameterValidation(object):
106106
def test_unknown_engine(self):
107-
with tempfile.TemporaryFile() as fp:
107+
with tempfile.NamedTemporaryFile() as fp:
108108
df = tm.makeDataFrame()
109-
df.to_csv(fp)
109+
df.to_csv(fp.name)
110110
fp.flush()
111-
fp.seek(0)
112111
with self.assertRaisesRegex(ValueError, 'Unknown engine'):
113-
read_csv(fp, engine='pyt')
112+
read_csv(fp.name, engine='pyt')

0 commit comments

Comments
 (0)