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

Method test_pdb_unittest_skip

testing/test_debugging.py:186–201  ·  view source on GitHub ↗

Test for issue #2137

(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

184 self.flush(child)
185
186 def test_pdb_unittest_skip(self, pytester: Pytester) -> None:
187 """Test for issue #2137"""
188 p1 = pytester.makepyfile(
189 """
190 import unittest
191 @unittest.skipIf(True, 'Skipping also with pdb active')
192 class MyTestCase(unittest.TestCase):
193 def test_one(self):
194 assert 0
195 """
196 )
197 child = pytester.spawn_pytest(f"-rs --pdb {p1}")
198 child.expect("Skipping also with pdb active")
199 child.expect_exact("= 1 skipped in")
200 child.sendeof()
201 self.flush(child)
202
203 def test_pdb_print_captured_stdout_and_stderr(self, pytester: Pytester) -> None:
204 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