Sha256: 57e664fdb6d5e44e7d20c76f6237666b0ff3f6eec0e9ad3e1107d307b9b98b2a

Contents?: true

Size: 587 Bytes

Versions: 1

Compression:

Stored size: 587 Bytes

Contents

# -*- coding: UTF-8 -*-
"""
Unit test support for :mod:`behave.api.async_test` tests.
"""

import inspect


# -----------------------------------------------------------------------------
# TEST SUPPORT:
# -----------------------------------------------------------------------------
class AsyncStepTheory(object):
    @staticmethod
    def ensure_normal_function(func):
        if hasattr(inspect, "isawaitable"):
            # -- SINCE: Python 3.5
            assert not inspect.isawaitable(func)

    @classmethod
    def validate(cls, func):
        cls.ensure_normal_function(func)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
busser-behave-0.1.3 vendor/behave/tests/api/testing_support_async.py