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

Method test_pdb_print_captured_logs_nologging

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

Source from the content-addressed store, hash-verified

299 self.flush(child)
300
301 def test_pdb_print_captured_logs_nologging(self, pytester: Pytester) -> None:
302 p1 = pytester.makepyfile(
303 """
304 def test_1():
305 import logging
306 logging.warning("get " + "rekt")
307 assert False
308 """
309 )
310 child = pytester.spawn_pytest(f"--show-capture=all --pdb -p no:logging {p1}")
311 child.expect("get rekt")
312 output = child.before.decode("utf8")
313 assert "captured log" not in output
314 child.expect("Pdb")
315 child.sendeof()
316 rest = child.read().decode("utf8")
317 assert "1 failed" in rest
318 self.flush(child)
319
320 def test_pdb_interaction_exception(self, pytester: Pytester) -> None:
321 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