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

Method test_no_carry_over

testing/test_capture.py:205–218  ·  view source on GitHub ↗
(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

203 )
204
205 def test_no_carry_over(self, pytester: Pytester) -> None:
206 p = pytester.makepyfile(
207 """
208 def test_func1():
209 print("in func1")
210 def test_func2():
211 print("in func2")
212 assert 0
213 """
214 )
215 result = pytester.runpytest(p)
216 s = result.stdout.str()
217 assert "in func1" not in s
218 assert "in func2" in s
219
220 def test_teardown_capturing(self, pytester: Pytester) -> None:
221 p = pytester.makepyfile(

Callers

nothing calls this directly

Calls 3

strMethod · 0.80
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected