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

Method test_pdb_custom_cls

testing/test_debugging.py:845–853  ·  view source on GitHub ↗
(
        self, pytester: Pytester, custom_pdb_calls: List[str]
    )

Source from the content-addressed store, hash-verified

843 self.flush(child)
844
845 def test_pdb_custom_cls(
846 self, pytester: Pytester, custom_pdb_calls: List[str]
847 ) -> None:
848 p1 = pytester.makepyfile("""xxx """)
849 result = pytester.runpytest_inprocess(
850 "--pdb", "--pdbcls=_pytest:_CustomPdb", p1
851 )
852 result.stdout.fnmatch_lines(["*NameError*xxx*", "*1 error*"])
853 assert custom_pdb_calls == ["init", "reset", "interaction"]
854
855 def test_pdb_custom_cls_invalid(self, pytester: Pytester) -> None:
856 result = pytester.runpytest_inprocess("--pdbcls=invalid")

Callers

nothing calls this directly

Calls 3

fnmatch_linesMethod · 0.80
makepyfileMethod · 0.45
runpytest_inprocessMethod · 0.45

Tested by

no test coverage detected