Skip to content

Commit

Permalink
TST: GH30999 Add placeholder messages to pandas/tests/io/test_sql.py …
Browse files Browse the repository at this point in the history
…and remove test for numexpr < 2.6.8 (pandas-dev#38920)
  • Loading branch information
moink authored and luckyvs1 committed Jan 20, 2021
1 parent b34e0ea commit 1c27f90
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
8 changes: 2 additions & 6 deletions pandas/tests/computation/test_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,10 @@ def testit():

if engine == "numexpr":
try:
import numexpr as ne
import numexpr as ne # noqa F401
except ImportError:
pytest.skip("no numexpr")
else:
if LooseVersion(ne.__version__) < LooseVersion(VERSIONS["numexpr"]):
with pytest.raises(ImportError):
testit()
else:
testit()
testit()
else:
testit()
4 changes: 2 additions & 2 deletions pandas/tests/io/test_sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -2896,7 +2896,7 @@ def test_execute_fail(self):
sql.execute('INSERT INTO test VALUES("foo", "bar", 1.234)', self.conn)
sql.execute('INSERT INTO test VALUES("foo", "baz", 2.567)', self.conn)

with pytest.raises(Exception):
with pytest.raises(Exception, match="<insert message here>"):
sql.execute('INSERT INTO test VALUES("foo", "bar", 7)', self.conn)

def test_execute_closed_connection(self, request, datapath):
Expand All @@ -2917,7 +2917,7 @@ def test_execute_closed_connection(self, request, datapath):
sql.execute('INSERT INTO test VALUES("foo", "bar", 1.234)', self.conn)
self.conn.close()

with pytest.raises(Exception):
with pytest.raises(Exception, match="<insert message here>"):
tquery("select * from test", con=self.conn)

# Initialize connection again (needed for tearDown)
Expand Down

0 comments on commit 1c27f90

Please sign in to comment.