diff --git a/pandas/tests/computation/test_compat.py b/pandas/tests/computation/test_compat.py index 9fc3ed4800d09..8fa11ab75dd67 100644 --- a/pandas/tests/computation/test_compat.py +++ b/pandas/tests/computation/test_compat.py @@ -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() diff --git a/pandas/tests/io/test_sql.py b/pandas/tests/io/test_sql.py index 52869f3f2fd42..6fb120faa6db2 100644 --- a/pandas/tests/io/test_sql.py +++ b/pandas/tests/io/test_sql.py @@ -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=""): sql.execute('INSERT INTO test VALUES("foo", "bar", 7)', self.conn) def test_execute_closed_connection(self, request, datapath): @@ -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=""): tquery("select * from test", con=self.conn) # Initialize connection again (needed for tearDown)