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

Method test_pdb_unittest_postmortem

testing/test_debugging.py:198–216  ·  testing/test_debugging.py::TestPDB.test_pdb_unittest_postmortem
(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

196 assert not child.isalive()
197
198 def test_pdb_unittest_postmortem(self, pytester: Pytester) -> None:
199 p1 = pytester.makepyfile(
200 class="st">"""
201 import unittest
202 class Blub(unittest.TestCase):
203 def tearDown(self):
204 self.filename = None
205 def test_false(self):
206 self.filename = &class="cm">#x27;debugclass="st">' + '.me'
207 assert 0
208 class="st">"""
209 )
210 child = pytester.spawn_pytest(fclass="st">"--pdb {p1}")
211 child.expect(class="st">"Pdb")
212 child.sendline(class="st">"p self.filename")
213 child.sendeof()
214 rest = child.read().decode(class="st">"utf8")
215 assert class="st">"debug.me" in rest
216 self.flush(child)
217
218 def test_pdb_unittest_skip(self, pytester: Pytester) -> None:
219 class="st">""class="st">"Test for issue class="cm">#2137"class="st">""

Callers

nothing calls this directly

Calls 4

flushMethod · 0.95
makepyfileMethod · 0.45
spawn_pytestMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected