Skip to content

Commit 1e4c9df

Browse files
authored
TST: GH30999 Add placeholder messages to pandas/tests/io/test_sql.py and remove test for numexpr < 2.6.8 (#38920)
1 parent def894c commit 1e4c9df

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

pandas/tests/computation/test_compat.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,10 @@ def testit():
3636

3737
if engine == "numexpr":
3838
try:
39-
import numexpr as ne
39+
import numexpr as ne # noqa F401
4040
except ImportError:
4141
pytest.skip("no numexpr")
4242
else:
43-
if LooseVersion(ne.__version__) < LooseVersion(VERSIONS["numexpr"]):
44-
with pytest.raises(ImportError):
45-
testit()
46-
else:
47-
testit()
43+
testit()
4844
else:
4945
testit()

pandas/tests/io/test_sql.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2896,7 +2896,7 @@ def test_execute_fail(self):
28962896
sql.execute('INSERT INTO test VALUES("foo", "bar", 1.234)', self.conn)
28972897
sql.execute('INSERT INTO test VALUES("foo", "baz", 2.567)', self.conn)
28982898

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

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

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

29232923
# Initialize connection again (needed for tearDown)

0 commit comments

Comments
 (0)