| 1 |
# -*- coding: UTF-8 -*- |
| 2 |
""" |
| 3 |
Unit test facade to protect py.test runner from Python 3.4/3.5 grammar changes. |
| 4 |
""" |
| 5 |
|
| 6 |
from __future__ import absolute_import |
| 7 |
import sys |
| 8 |
|
| 9 |
python_version = sys.version_info[:2] |
| 10 |
if python_version >= (3, 5): |
| 11 |
# -- PROTECTED-IMPORT: |
| 12 |
# Older Python version have problems with grammer extensions (async/await). |
| 13 |
from ._test_async_step35 import TestAsyncStepDecorator35 |
| 14 |
from ._test_async_step34 import TestAsyncStepDecorator34, TestAsyncContext |
| 15 |
elif (3, 4) <= python_version < (3, 5): |
| 16 |
# -- PROTECTED-IMPORT: |
| 17 |
# Older Python version have problems with grammer extensions (yield-from). |
| 18 |
from ._test_async_step34 import TestAsyncStepDecorator34, TestAsyncContext |