diff options
author | efkin <efkin@riseup.net> | 2017-03-13 21:17:18 +0100 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2017-03-17 17:52:57 +0100 |
commit | 7562655cf4bf28a1ebd6c458334da0c166f34e61 (patch) | |
tree | 54bc2de9b71e35d56fdcc3dd1ee9642ce8fd491d /testing/tests | |
parent | ba3fcb08eafd389bdbf0ab9c59577a25c8d8126d (diff) |
[refactor] Improve python3 compatibility
With this commit all tests on py34 tox environment
are collected.
Diffstat (limited to 'testing/tests')
-rw-r--r-- | testing/tests/sqlcipher/test_backend.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/testing/tests/sqlcipher/test_backend.py b/testing/tests/sqlcipher/test_backend.py index 643fa041..6e9595db 100644 --- a/testing/tests/sqlcipher/test_backend.py +++ b/testing/tests/sqlcipher/test_backend.py @@ -22,11 +22,6 @@ import pytest import time import threading import sys -if sys.version_info[0] < 3: - from pysqlcipher import dbapi2 -else: - from pysqlcipher3 import dbapi2 -from testscenarios import TestWithScenarios # l2db stuff. from leap.soledad.common.l2db import errors @@ -48,6 +43,13 @@ from test_soledad.util import SQLCIPHER_SCENARIOS from test_soledad.util import PASSWORD from test_soledad.util import BaseSoledadTest +from testscenarios import TestWithScenarios + +if sys.version_info[0] < 3: + from pysqlcipher import dbapi2 +else: + from pysqlcipher3 import dbapi2 + def sqlcipher_open(path, passphrase, create=True, document_factory=None): return SQLCipherDatabase( |