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

Function test_nose_setup_func_failure_2

testing/test_nose.py:107–123  ·  view source on GitHub ↗
(pytester: Pytester)

Source from the content-addressed store, hash-verified

105
106
107def test_nose_setup_func_failure_2(pytester: Pytester) -> None:
108 pytester.makepyfile(
109 """
110 values = []
111
112 my_setup = 1
113 my_teardown = 2
114
115 def test_hello():
116 assert values == []
117
118 test_hello.setup = my_setup
119 test_hello.teardown = my_teardown
120 """
121 )
122 reprec = pytester.inline_run()
123 reprec.assertoutcome(passed=1)
124
125
126def test_nose_setup_partial(pytester: Pytester) -> None:

Callers

nothing calls this directly

Calls 3

assertoutcomeMethod · 0.80
makepyfileMethod · 0.45
inline_runMethod · 0.45

Tested by

no test coverage detected