Skip to content

Commit b495ffa

Browse files
committed
Use pytest instead
1 parent ed62d17 commit b495ffa

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

pandas/tests/io/parser/test_parsers.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
import os
44
import tempfile
5-
import unittest
5+
6+
import pytest
67

78
import pandas.util.testing as tm
89

@@ -103,11 +104,12 @@ def read_table(self, *args, **kwds):
103104
return read_table(*args, **kwds)
104105

105106

106-
class TestParameterValidation(unittest.TestCase):
107+
class TestParameterValidation(object):
107108
def test_unknown_engine(self):
108109
with tempfile.NamedTemporaryFile() as fp:
109110
df = tm.makeDataFrame()
110111
df.to_csv(fp.name)
111112
fp.flush()
112-
with self.assertRaisesRegex(ValueError, 'Unknown engine'):
113+
with pytest.raises(ValueError) as exc_info:
113114
read_csv(fp.name, engine='pyt')
115+
exc_info.matches('Unknown engine')

0 commit comments

Comments
 (0)