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

Method test_set_trace_capturing_afterwards

testing/test_debugging.py:464–483  ·  view source on GitHub ↗
(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

462 self.flush(child)
463
464 def test_set_trace_capturing_afterwards(self, pytester: Pytester) -> None:
465 p1 = pytester.makepyfile(
466 """
467 import pdb
468 def test_1():
469 pdb.set_trace()
470 def test_2():
471 print("hello")
472 assert 0
473 """
474 )
475 child = pytester.spawn_pytest(str(p1))
476 child.expect("test_1")
477 child.send("c\n")
478 child.expect("test_2")
479 child.expect("Captured")
480 child.expect("hello")
481 child.sendeof()
482 child.read()
483 self.flush(child)
484
485 def test_pdb_interaction_doctest(self, pytester: Pytester) -> None:
486 p1 = pytester.makepyfile(

Callers

nothing calls this directly

Calls 4

flushMethod · 0.95
makepyfileMethod · 0.45
spawn_pytestMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected