MCPcopy
hub / github.com/pytest-dev/pytest / test_pdb_set_trace_interception

Method test_pdb_set_trace_interception

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

Source from the content-addressed store, hash-verified

443 self.flush(child)
444
445 def test_pdb_set_trace_interception(self, pytester: Pytester) -> None:
446 p1 = pytester.makepyfile(
447 """
448 import pdb
449 def test_1():
450 pdb.set_trace()
451 """
452 )
453 child = pytester.spawn_pytest(str(p1))
454 child.expect("test_1")
455 child.expect("Pdb")
456 child.sendline("q")
457 rest = child.read().decode("utf8")
458 assert "no tests ran" in rest
459 assert "reading from stdin while output" not in rest
460 assert "BdbQuit" not in rest
461 self.flush(child)
462
463 def test_pdb_and_capsys(self, pytester: Pytester) -> None:
464 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