Skip to content

Commit dc246dc

Browse files
committed
Move ASYNC_AWAIT to testing/test_basic.py
1 parent 083e95e commit dc246dc

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

pytest_twisted.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import inspect
2-
import sys
32

43
import decorator
54
import greenlet
@@ -10,9 +9,6 @@
109
from twisted.python import failure
1110

1211

13-
ASYNC_AWAIT = sys.version_info >= (3, 5)
14-
15-
1612
class WrongReactorAlreadyInstalledError(Exception):
1713
pass
1814

testing/test_basic.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
import pytest_twisted
77

88

9+
ASYNC_AWAIT = sys.version_info >= (3, 5)
10+
11+
912
def assert_outcomes(run_result, outcomes):
1013
formatted_output = format_run_result_output_for_assert(run_result)
1114

@@ -39,7 +42,7 @@ def skip_if_reactor_not(request, expected_reactor):
3942

4043
def skip_if_no_async_await():
4144
return pytest.mark.skipif(
42-
not pytest_twisted.ASYNC_AWAIT,
45+
not ASYNC_AWAIT,
4346
reason="async/await syntax not supported on Python <3.5",
4447
)
4548

0 commit comments

Comments
 (0)