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

Method test_pdb_interaction_exception

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

Source from the content-addressed store, hash-verified

286 self.flush(child)
287
288 def test_pdb_interaction_exception(self, pytester: Pytester) -> None:
289 p1 = pytester.makepyfile(
290 """
291 import pytest
292 def globalfunc():
293 pass
294 def test_1():
295 pytest.raises(ValueError, globalfunc)
296 """
297 )
298 child = pytester.spawn_pytest("--pdb %s" % p1)
299 child.expect(".*def test_1")
300 child.expect(".*pytest.raises.*globalfunc")
301 child.expect("Pdb")
302 child.sendline("globalfunc")
303 child.expect(".*function")
304 child.sendeof()
305 child.expect("1 failed")
306 self.flush(child)
307
308 def test_pdb_interaction_on_collection_issue181(self, pytester: Pytester) -> None:
309 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