(self, pytester: Pytester)
| 353 | self.flush(child) |
| 354 | |
| 355 | def test_pdb_interaction_on_internal_error(self, pytester: Pytester) -> None: |
| 356 | pytester.makeconftest( |
| 357 | """ |
| 358 | def pytest_runtest_protocol(): |
| 359 | 0/0 |
| 360 | """ |
| 361 | ) |
| 362 | p1 = pytester.makepyfile("def test_func(): pass") |
| 363 | child = pytester.spawn_pytest(f"--pdb {p1}") |
| 364 | child.expect("Pdb") |
| 365 | |
| 366 | # INTERNALERROR is only displayed once via terminal reporter. |
| 367 | assert ( |
| 368 | len( |
| 369 | [ |
| 370 | x |
| 371 | for x in child.before.decode().splitlines() |
| 372 | if x.startswith("INTERNALERROR> Traceback") |
| 373 | ] |
| 374 | ) |
| 375 | == 1 |
| 376 | ) |
| 377 | |
| 378 | child.sendeof() |
| 379 | self.flush(child) |
| 380 | |
| 381 | def test_pdb_prevent_ConftestImportFailure_hiding_exception( |
| 382 | self, pytester: Pytester |
nothing calls this directly
no test coverage detected