File tree Expand file tree Collapse file tree 3 files changed +21
-9
lines changed Expand file tree Collapse file tree 3 files changed +21
-9
lines changed Original file line number Diff line number Diff line change 1
1
-e git+https://github.com/RDFLib/rdflib.git#egg=rdflib
2
2
psycopg2
3
- -e git+https://github.com/davispuh/MySQL-for-Python-3#egg=MySQL-python
3
+ http://cdn.mysql.com/Downloads/Connector-Python/mysql-connector-python-1.0.10.zip
4
+ # -e git+https://github.com/davispuh/MySQL-for-Python-3#egg=MySQL-python
Original file line number Diff line number Diff line change 1
1
import unittest
2
2
from nose import SkipTest
3
+ from rdflib .py3compat import PY3
3
4
import os
4
5
if os .environ .get ('DB' ) != 'mysql' :
5
6
raise SkipTest ("MySQL not under test" )
6
- try :
7
- import MySQLdb
8
- except ImportError :
9
- raise SkipTest ("MySQLdb not found, skipping MySQL tests" )
7
+ if PY3 :
8
+ try :
9
+ import mysql
10
+ assert mysql
11
+ except ImportError :
12
+ raise SkipTest ("MySQL-connector not found, skipping MySQL tests" )
13
+ else :
14
+ try :
15
+ import MySQLdb
16
+ assert MySQLdb
17
+ except ImportError :
18
+ raise SkipTest ("MySQLdb not found, skipping MySQL tests" )
10
19
import logging
11
20
_logger = logging .getLogger (__name__ )
12
21
from . import context_case
16
25
# Specific to Travis-ci continuous integration and testing ...
17
26
sqlalchemy_url = Literal (os .environ .get (
18
27
'DBURI' ,
19
- "mysql://[email protected] :3306/rdflibsqla_test?charset=utf8" ))
28
+ "mysql+mysqlconnector ://[email protected] :3306/rdflibsqla_test?charset=utf8" ))
20
29
# Generally ...
21
30
# sqlalchemy_url = Literal(
22
31
# "mysql+mysqldb://user:password@hostname:port/database?charset=utf8")
@@ -52,7 +61,7 @@ def tearDown(self):
52
61
def testLenInMultipleContexts (self ):
53
62
raise SkipTest ("Known issue." )
54
63
55
-
64
+
56
65
class SQLAMySQLIssueTestCase (unittest .TestCase ):
57
66
storetest = True
58
67
storename = "SQLAlchemy"
Original file line number Diff line number Diff line change 37
37
git+http://github.com/RDFLib/rdflib# egg=rdflib
38
38
SQLAlchemy
39
39
psycopg2
40
- git+https://github.com/davispuh/MySQL-for-Python-3# egg=MySQL-python
40
+ http://cdn.mysql.com/Downloads/Connector-Python/mysql-connector-python-1.0.10.zip
41
+ # git+https://github.com/davispuh/MySQL-for-Python-3#egg=MySQL-python
41
42
# lxml
42
43
43
44
[testenv:py33]
51
52
git+http://github.com/RDFLib/rdflib# egg=rdflib
52
53
SQLAlchemy
53
54
psycopg2
54
- git+https://github.com/davispuh/MySQL-for-Python-3# egg=MySQL-python
55
+ http://cdn.mysql.com/Downloads/Connector-Python/mysql-connector-python-1.0.10.zip
56
+ # git+https://github.com/davispuh/MySQL-for-Python-3#egg=MySQL-python
55
57
# oursql
56
58
# lxml
57
59
You can’t perform that action at this time.
0 commit comments