summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2015-05-11 14:30:04 -0400
committerYury Selivanov <yselivanov@sprymix.com>2015-05-11 14:30:04 -0400
commit1181bc193ad7636d79267fc4b3f03ea238a3f345 (patch)
tree0e37de2286a3869c051fe30b53e53debf9ab7f93
parent26595991285ee44427cfa00adb3f9fff70953166 (diff)
downloadtrollius-git-1181bc193ad7636d79267fc4b3f03ea238a3f345.tar.gz
Fix script_helper imports for 3.4
-rw-r--r--tests/test_base_events.py9
-rw-r--r--tests/test_tasks.py9
2 files changed, 14 insertions, 4 deletions
diff --git a/tests/test_base_events.py b/tests/test_base_events.py
index aaa8e67..fd864ce 100644
--- a/tests/test_base_events.py
+++ b/tests/test_base_events.py
@@ -16,10 +16,15 @@ from asyncio import constants
from asyncio import test_utils
try:
from test import support
- from test.support.script_helper import assert_python_ok
except ImportError:
from asyncio import test_support as support
- from asyncio.test_support import assert_python_ok
+try:
+ from test.support.script_helper import assert_python_ok
+except ImportError:
+ try:
+ from test.script_helper import assert_python_ok
+ except ImportError:
+ from asyncio.test_support import assert_python_ok
MOCK_ANY = mock.ANY
diff --git a/tests/test_tasks.py b/tests/test_tasks.py
index e47a668..5b49e76 100644
--- a/tests/test_tasks.py
+++ b/tests/test_tasks.py
@@ -15,10 +15,15 @@ from asyncio import coroutines
from asyncio import test_utils
try:
from test import support
- from test.support.script_helper import assert_python_ok
except ImportError:
from asyncio import test_support as support
- from asyncio.test_support import assert_python_ok
+try:
+ from test.support.script_helper import assert_python_ok
+except ImportError:
+ try:
+ from test.script_helper import assert_python_ok
+ except ImportError:
+ from asyncio.test_support import assert_python_ok
PY34 = (sys.version_info >= (3, 4))