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

Method test_pdb_set_trace_interception

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

Source from the content-addressed store, hash-verified

409 self.flush(child)
410
411 def test_pdb_set_trace_interception(self, pytester: Pytester) -> None:
412 p1 = pytester.makepyfile(
413 """
414 import pdb
415 def test_1():
416 pdb.set_trace()
417 """
418 )
419 child = pytester.spawn_pytest(str(p1))
420 child.expect("test_1")
421 child.expect("Pdb")
422 child.sendline("q")
423 rest = child.read().decode("utf8")
424 assert "no tests ran" in rest
425 assert "reading from stdin while output" not in rest
426 assert "BdbQuit" not in rest
427 self.flush(child)
428
429 def test_pdb_and_capsys(self, pytester: Pytester) -> None:
430 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