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

Method test_pdb_interaction_exception

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

Source from the content-addressed store, hash-verified

318 self.flush(child)
319
320 def test_pdb_interaction_exception(self, pytester: Pytester) -> None:
321 p1 = pytester.makepyfile(
322 """
323 import pytest
324 def globalfunc():
325 pass
326 def test_1():
327 with pytest.raises(ValueError):
328 globalfunc()
329 """
330 )
331 child = pytester.spawn_pytest(f"--pdb {p1}")
332 child.expect(".*def test_1")
333 child.expect(r"with pytest.raises\(ValueError\)")
334 child.expect("Pdb")
335 child.sendline("globalfunc")
336 child.expect(".*function")
337 child.sendeof()
338 child.expect("1 failed")
339 self.flush(child)
340
341 def test_pdb_interaction_on_collection_issue181(self, pytester: Pytester) -> None:
342 p1 = pytester.makepyfile(

Callers

nothing calls this directly

Calls 3

flushMethod · 0.95
makepyfileMethod · 0.45
spawn_pytestMethod · 0.45

Tested by

no test coverage detected