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

Method test_pdb_unittest_skip

testing/test_debugging.py:218–233  ·  testing/test_debugging.py::TestPDB.test_pdb_unittest_skip

Test for issue #2137

(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

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">""
220 p1 = pytester.makepyfile(
221 class="st">"""
222 import unittest
223 @unittest.skipIf(True, &class="cm">#x27;Skipping also with pdb active')
224 class MyTestCase(unittest.TestCase):
225 def test_one(self):
226 assert 0
227 class="st">"""
228 )
229 child = pytester.spawn_pytest(fclass="st">"-rs --pdb {p1}")
230 child.expect(class="st">"Skipping also with pdb active")
231 child.expect_exact(class="st">"= 1 skipped in")
232 child.sendeof()
233 self.flush(child)
234
235 def test_pdb_print_captured_stdout_and_stderr(self, pytester: Pytester) -> None:
236 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