MCPcopy Create free account
hub / github.com/pytest-dev/pytest / xunit_setup_function_fixture

Method xunit_setup_function_fixture

src/_pytest/python.py:581–591  ·  view source on GitHub ↗
(request)

Source from the content-addressed store, hash-verified

579 name=f"_xunit_setup_function_fixture_{self.obj.__name__}",
580 )
581 def xunit_setup_function_fixture(request) -> Generator[None, None, None]:
582 if request.instance is not None:
583 # in this case we are bound to an instance, so we need to let
584 # setup_method handle this
585 yield
586 return
587 if setup_function is not None:
588 _call_with_optional_argument(setup_function, request.function)
589 yield
590 if teardown_function is not None:
591 _call_with_optional_argument(teardown_function, request.function)
592
593 self.obj.__pytest_setup_function = xunit_setup_function_fixture
594

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected