We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 885522a commit 79beeb6Copy full SHA for 79beeb6
pandas/tests/io/test_sql.py
@@ -948,6 +948,13 @@ def test_database_uri_string(self):
948
949
# using driver that will not be installed on Travis to trigger error
950
# in sqlalchemy.create_engine -> test passing of this error to user
951
+ try:
952
+ # the rest of this test depends on pg8000's being absent
953
+ import pg8000 # noqa
954
+ pytest.skip("pg8000 is installed")
955
+ except ImportError:
956
+ pass
957
+
958
db_uri = "postgresql+pg8000://user:pass@host/dbname"
959
with tm.assert_raises_regex(ImportError, "pg8000"):
960
sql.read_sql("select * from table", db_uri)
0 commit comments