Skip to content

Commit

Permalink
Use pytest instead
Browse files Browse the repository at this point in the history
  • Loading branch information
jtratner committed May 26, 2017
1 parent ed62d17 commit b495ffa
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pandas/tests/io/parser/test_parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

import os
import tempfile
import unittest

import pytest

import pandas.util.testing as tm

Expand Down Expand Up @@ -103,11 +104,12 @@ def read_table(self, *args, **kwds):
return read_table(*args, **kwds)


class TestParameterValidation(unittest.TestCase):
class TestParameterValidation(object):
def test_unknown_engine(self):
with tempfile.NamedTemporaryFile() as fp:
df = tm.makeDataFrame()
df.to_csv(fp.name)
fp.flush()
with self.assertRaisesRegex(ValueError, 'Unknown engine'):
with pytest.raises(ValueError) as exc_info:
read_csv(fp.name, engine='pyt')
exc_info.matches('Unknown engine')

0 comments on commit b495ffa

Please sign in to comment.