module documentation

invent a quick version of pytest autouse fixtures as pytest's unacceptably slow collection/high memory use in pytest 4.6.11, which is the highest version that works in py2k.

by "too-slow" we mean the test suite can't even manage to be collected for a single process in less than 70 seconds or so and memory use seems to be very high as well. for two or four workers the job just times out after ten minutes.

so instead we have invented a very limited form of these fixtures, as our current use of "autouse" fixtures are limited to those in fixtures.py.

assumptions for these fixtures:

  1. we are only using "function" or "class" scope
  2. the functions must be associated with a test class
  3. the fixture functions cannot themselves use pytest fixtures
  4. the fixture functions must use yield, not return

When py2k support is removed and we can stay on a modern pytest version, this can all be removed.

Function add​_fixture Undocumented
Function run​_class​_fixture​_setup Undocumented
Function run​_class​_fixture​_teardown Undocumented
Function run​_fn​_fixture​_setup Undocumented
Function run​_fn​_fixture​_teardown Undocumented
Function scan​_for​_fixtures​_to​_use​_for​_class Undocumented
Variable ​_py2k​_class​_fixtures Undocumented
Variable ​_py2k​_cls​_fixture​_stack Undocumented
Variable ​_py2k​_fixture​_fn​_names Undocumented
Variable ​_py2k​_fn​_fixture​_stack Undocumented
Variable ​_py2k​_function​_fixtures Undocumented
def add_fixture(fn, fixture):

Undocumented

def run_class_fixture_setup(request):

Undocumented

def run_class_fixture_teardown(request):

Undocumented

def run_fn_fixture_setup(request):

Undocumented

def run_fn_fixture_teardown(request):

Undocumented

def scan_for_fixtures_to_use_for_class(item):

Undocumented

_py2k_class_fixtures =

Undocumented

_py2k_cls_fixture_stack: list =

Undocumented

_py2k_fixture_fn_names =

Undocumented

_py2k_fn_fixture_stack: list =

Undocumented

_py2k_function_fixtures =

Undocumented