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

Method test_pdb_used_in_generate_tests

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

Source from the content-addressed store, hash-verified

763 self.flush(child)
764
765 def test_pdb_used_in_generate_tests(self, pytester: Pytester) -> None:
766 p1 = pytester.makepyfile(
767 """
768 import pytest
769 def pytest_generate_tests(metafunc):
770 pytest.set_trace()
771 x = 5
772 def test_foo(a):
773 pass
774 """
775 )
776 child = pytester.spawn_pytest(str(p1))
777 child.expect("x = 5")
778 child.expect("Pdb")
779 child.sendeof()
780 self.flush(child)
781
782 def test_pdb_collection_failure_is_shown(self, pytester: Pytester) -> None:
783 p1 = pytester.makepyfile("xxx")

Callers

nothing calls this directly

Calls 3

flushMethod · 0.95
makepyfileMethod · 0.45
spawn_pytestMethod · 0.45

Tested by

no test coverage detected