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

Method test_pdb_and_capsys

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

Source from the content-addressed store, hash-verified

427 self.flush(child)
428
429 def test_pdb_and_capsys(self, pytester: Pytester) -> None:
430 p1 = pytester.makepyfile(
431 """
432 import pytest
433 def test_1(capsys):
434 print("hello1")
435 pytest.set_trace()
436 """
437 )
438 child = pytester.spawn_pytest(str(p1))
439 child.expect("test_1")
440 child.send("capsys.readouterr()\n")
441 child.expect("hello1")
442 child.sendeof()
443 child.read()
444 self.flush(child)
445
446 def test_pdb_with_caplog_on_pdb_invocation(self, pytester: Pytester) -> None:
447 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