Пример #1
0
        def wrap(fn):
            if config.any_async:
                fn = asyncio._maybe_async_wrapper(fn)
            # other wrappers may be added here

            # now apply FixtureFunctionMarker
            fn = fixture(fn)
            return fn
Пример #2
0
        def wrap(fn):
            if config.any_async:
                fn = asyncio._maybe_async_wrapper(fn)
            # other wrappers may be added here

            if py2k and "autouse" in kw:
                # py2k workaround for too-slow collection of autouse fixtures
                # in pytest 4.6.11.  See notes in reinvent_fixtures_py2k for
                # rationale.

                # comment this condition out in order to disable the
                # py2k workaround entirely.
                reinvent_fixtures_py2k.add_fixture(fn, fixture)
            else:
                # now apply FixtureFunctionMarker
                fn = fixture(fn)

            return fn