File: test_async_step.py

package info (click to toggle)
behave 1.2.6-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,160 kB
  • sloc: python: 19,857; makefile: 137; sh: 18
file content (18 lines) | stat: -rw-r--r-- 703 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# -*- coding: UTF-8 -*-
"""
Unit test facade to protect py.test runner from Python 3.4/3.5 grammar changes.
"""

from __future__ import absolute_import
import sys

python_version = sys.version_info[:2]
if python_version >= (3, 5):
    # -- PROTECTED-IMPORT:
    # Older Python version have problems with grammer extensions (async/await).
    from ._test_async_step35 import TestAsyncStepDecorator35
    from ._test_async_step34 import TestAsyncStepDecorator34, TestAsyncContext
elif (3, 4) <= python_version < (3, 5):
    # -- PROTECTED-IMPORT:
    # Older Python version have problems with grammer extensions (yield-from).
    from ._test_async_step34 import TestAsyncStepDecorator34, TestAsyncContext