From 7562655cf4bf28a1ebd6c458334da0c166f34e61 Mon Sep 17 00:00:00 2001 From: efkin Date: Mon, 13 Mar 2017 21:17:18 +0100 Subject: [refactor] Improve python3 compatibility With this commit all tests on py34 tox environment are collected. --- testing/tests/sqlcipher/test_backend.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'testing/tests') 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( -- cgit v1.2.3