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

Method test_pdb_print_captured_logs_nologging

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

Source from the content-addressed store, hash-verified

267 self.flush(child)
268
269 def test_pdb_print_captured_logs_nologging(self, pytester: Pytester) -> None:
270 p1 = pytester.makepyfile(
271 """
272 def test_1():
273 import logging
274 logging.warn("get " + "rekt")
275 assert False
276 """
277 )
278 child = pytester.spawn_pytest("--show-capture=all --pdb -p no:logging %s" % p1)
279 child.expect("get rekt")
280 output = child.before.decode("utf8")
281 assert "captured log" not in output
282 child.expect("Pdb")
283 child.sendeof()
284 rest = child.read().decode("utf8")
285 assert "1 failed" in rest
286 self.flush(child)
287
288 def test_pdb_interaction_exception(self, pytester: Pytester) -> None:
289 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