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

Method test_pdb_not_altered

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

Source from the content-addressed store, hash-verified

1029 not SUPPORTS_BREAKPOINT_BUILTIN, reason="Requires breakpoint() builtin"
1030 )
1031 def test_pdb_not_altered(self, pytester: Pytester) -> None:
1032 p1 = pytester.makepyfile(
1033 """
1034 import pdb
1035 def test_1():
1036 pdb.set_trace()
1037 assert 0
1038 """
1039 )
1040 child = pytester.spawn_pytest(str(p1))
1041 child.expect("test_1")
1042 child.expect("Pdb")
1043 child.sendline("c")
1044 rest = child.read().decode("utf8")
1045 assert "1 failed" in rest
1046 assert "reading from stdin while output" not in rest
1047 TestPDB.flush(child)
1048
1049
1050class TestTraceOption:

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected