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

Method test_pdb_interaction_exception

testing/test_debugging.py:320–339  ·  testing/test_debugging.py::TestPDB.test_pdb_interaction_exception
(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 class="st">"""
323 import pytest
324 def globalfunc():
325 pass
326 def test_1():
327 with pytest.raises(ValueError):
328 globalfunc()
329 class="st">"""
330 )
331 child = pytester.spawn_pytest(fclass="st">"--pdb {p1}")
332 child.expect(class="st">".*def test_1")
333 child.expect(rclass="st">"with pytest.raises\(ValueError\)")
334 child.expect(class="st">"Pdb")
335 child.sendline(class="st">"globalfunc")
336 child.expect(class="st">".*function")
337 child.sendeof()
338 child.expect(class="st">"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