diff --git a/src/socketio/tornado.py b/src/socketio/tornado.py index 5b2e6f6..160bd32 100644 --- a/src/socketio/tornado.py +++ b/src/socketio/tornado.py @@ -1,10 +1,8 @@ -import sys -if sys.version_info >= (3, 5): - try: - from engineio.async_drivers.tornado import get_tornado_handler as \ - get_engineio_handler - except ImportError: # pragma: no cover - get_engineio_handler = None +try: + from engineio.async_drivers.tornado import get_tornado_handler as \ + get_engineio_handler +except ImportError: # pragma: no cover + get_engineio_handler = None def get_tornado_handler(socketio_server): # pragma: no cover diff --git a/tests/async/test_client.py b/tests/async/test_client.py index d2a2b8c..8b8f97a 100644 --- a/tests/async/test_client.py +++ b/tests/async/test_client.py @@ -1,5 +1,4 @@ import asyncio -import sys import unittest from unittest import mock @@ -13,7 +12,6 @@ from socketio import packet from .helpers import AsyncMock, _run -@unittest.skipIf(sys.version_info < (3, 5), 'only for Python 3.5+') class TestAsyncClient(unittest.TestCase): def test_is_asyncio_based(self): c = async_client.AsyncClient() diff --git a/tests/async/test_manager.py b/tests/async/test_manager.py index 0b2fc93..90d4ad1 100644 --- a/tests/async/test_manager.py +++ b/tests/async/test_manager.py @@ -1,4 +1,3 @@ -import sys import unittest from unittest import mock @@ -7,7 +6,6 @@ from socketio import packet from .helpers import AsyncMock, _run -@unittest.skipIf(sys.version_info < (3, 5), 'only for Python 3.5+') class TestAsyncManager(unittest.TestCase): def setUp(self): id = 0 diff --git a/tests/async/test_pubsub_manager.py b/tests/async/test_pubsub_manager.py index 579452a..2881299 100644 --- a/tests/async/test_pubsub_manager.py +++ b/tests/async/test_pubsub_manager.py @@ -1,6 +1,5 @@ import asyncio import functools -import sys import unittest from unittest import mock @@ -12,7 +11,6 @@ from socketio import packet from .helpers import AsyncMock, _run -@unittest.skipIf(sys.version_info < (3, 5), 'only for Python 3.5+') class TestAsyncPubSubManager(unittest.TestCase): def setUp(self): id = 0 diff --git a/tests/async/test_server.py b/tests/async/test_server.py index bc83bdc..256545e 100644 --- a/tests/async/test_server.py +++ b/tests/async/test_server.py @@ -1,6 +1,5 @@ import asyncio import logging -import sys import unittest from unittest import mock @@ -16,7 +15,6 @@ from socketio import packet from .helpers import AsyncMock, _run -@unittest.skipIf(sys.version_info < (3, 5), 'only for Python 3.5+') @mock.patch('socketio.server.engineio.AsyncServer', **{ 'return_value.generate_id.side_effect': [str(i) for i in range(1, 10)], 'return_value.send_packet': AsyncMock()})