Skip to content

Commit 11c2ba6

Browse files
committed
Adjust dialect differently for 2/3
1 parent cc9fc83 commit 11c2ba6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/test_sqlalchemy_mysql.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@
88
try:
99
import mysql
1010
assert mysql
11+
dialect = "mysqlconnector"
1112
except ImportError:
1213
raise SkipTest("MySQL-connector not found, skipping MySQL tests")
1314
else:
1415
try:
1516
import MySQLdb
1617
assert MySQLdb
18+
dialect = "mysqldb"
1719
except ImportError:
1820
raise SkipTest("MySQLdb not found, skipping MySQL tests")
1921
import logging
@@ -25,7 +27,7 @@
2527
# Specific to Travis-ci continuous integration and testing ...
2628
sqlalchemy_url = Literal(os.environ.get(
2729
'DBURI',
28-
"mysql+mysqlconnector://[email protected]:3306/rdflibsqla_test?charset=utf8"))
30+
"mysql+%s://[email protected]:3306/rdflibsqla_test?charset=utf8" % dialect))
2931
# Generally ...
3032
# sqlalchemy_url = Literal(
3133
# "mysql+mysqldb://user:password@hostname:port/database?charset=utf8")

0 commit comments

Comments
 (0)