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

Method test_setup_function

testing/acceptance_test.py:948–959  ·  view source on GitHub ↗
(self, pytester: Pytester, mock_timing)

Source from the content-addressed store, hash-verified

946 """
947
948 def test_setup_function(self, pytester: Pytester, mock_timing) -> None:
949 pytester.makepyfile(self.source)
950 result = pytester.runpytest_inprocess("--durations=10")
951 assert result.ret == 0
952
953 result.stdout.fnmatch_lines_random(
954 """
955 *durations*
956 5.00s call *test_1*
957 2.00s setup *test_1*
958 """
959 )
960
961
962def test_zipimport_hook(pytester: Pytester) -> None:

Callers

nothing calls this directly

Calls 3

fnmatch_lines_randomMethod · 0.80
makepyfileMethod · 0.45
runpytest_inprocessMethod · 0.45

Tested by

no test coverage detected