summaryrefslogtreecommitdiff
path: root/testing/tests/sqlcipher/test_backend.py
diff options
context:
space:
mode:
authorefkin <efkin@riseup.net>2017-03-13 20:20:19 +0100
committerKali Kaneko <kali@leap.se>2017-03-17 17:52:56 +0100
commitba3fcb08eafd389bdbf0ab9c59577a25c8d8126d (patch)
tree24f41600853a07318a035c5de4fc11f8e10fdd6a /testing/tests/sqlcipher/test_backend.py
parent1034d3107b57f03d7ed2257aef39cede2f6686ef (diff)
[test] Prepare tests for python3 compatibility
Diffstat (limited to 'testing/tests/sqlcipher/test_backend.py')
-rw-r--r--testing/tests/sqlcipher/test_backend.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/testing/tests/sqlcipher/test_backend.py b/testing/tests/sqlcipher/test_backend.py
index caacba0d..643fa041 100644
--- a/testing/tests/sqlcipher/test_backend.py
+++ b/testing/tests/sqlcipher/test_backend.py
@@ -21,8 +21,11 @@ import os
import pytest
import time
import threading
-
-from pysqlcipher import dbapi2
+import sys
+if sys.version_info[0] < 3:
+ from pysqlcipher import dbapi2
+else:
+ from pysqlcipher3 import dbapi2
from testscenarios import TestWithScenarios
# l2db stuff.
@@ -148,7 +151,7 @@ class TestSQLCipherDatabase(tests.TestCase):
def run(self):
try:
db2 = SQLCipherDatabaseTesting(dbname, 2)
- except Exception, e:
+ except Exception as e:
SecondTry.outcome2.append(e)
else:
SecondTry.outcome2.append(db2)