Skip to content

Commit 9ccf9fa

Browse files
committed
Removing mysqlconnector test in mysql tests
- mysql-connector is not the "preferred" DB API adapter for MySQL, so switching to one that is
1 parent 46a8c70 commit 9ccf9fa

File tree

1 file changed

+7
-17
lines changed

1 file changed

+7
-17
lines changed

test/test_sqlalchemy_mysql.py

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,20 @@
55
import pytest
66
from rdflib import Literal
77
from rdflib.graph import ConjunctiveGraph as Graph
8-
from six import PY3
98
from rdflib.store import NO_STORE, VALID_STORE
109
from rdflib.term import URIRef
1110

1211
from . import context_case
1312
from . import graph_case
1413

1514

16-
if PY3:
17-
try:
18-
import mysql
19-
assert mysql
20-
dialect = "mysqlconnector"
21-
except ImportError:
22-
pytest.skip("MySQL-connector not found, skipping MySQL tests",
23-
allow_module_level=True)
24-
else:
25-
try:
26-
import MySQLdb
27-
assert MySQLdb
28-
dialect = "mysqldb"
29-
except ImportError:
30-
pytest.skip("MySQLdb not found, skipping MySQL tests",
31-
allow_module_level=True)
15+
try:
16+
import MySQLdb
17+
assert MySQLdb
18+
dialect = "mysqldb"
19+
except ImportError:
20+
pytest.skip("MySQLdb not found, skipping MySQL tests",
21+
allow_module_level=True)
3222

3323

3424
if os.environ.get("DB") != "mysql":

0 commit comments

Comments
 (0)