We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 62e2100 commit 555490eCopy full SHA for 555490e
pytest_twisted.py
@@ -1,4 +1,13 @@
1
import inspect
2
+import sys
3
+
4
+ASYNC_AWAIT = sys.version_info >= (3, 5)
5
6
+if ASYNC_AWAIT:
7
+ import asyncio
8
+else:
9
+ asyncio = None
10
11
12
import decorator
13
import greenlet
testing/test_basic.py
@@ -3,6 +3,8 @@
import pytest
+import pytest_twisted
def assert_outcomes(run_result, outcomes):
formatted_output = format_run_result_output_for_assert(run_result)
@@ -39,7 +41,7 @@ def skip_if_reactor_not(expected_reactor):
39
41
40
42
def skip_if_no_async_await():
43
return pytest.mark.skipif(
- sys.version_info < (3, 5),
44
+ not pytest_twisted.ASYNC_AWAIT,
45
reason="async/await syntax not support on Python <3.5",
46
)
47
0 commit comments