(self, pytester: Pytester)
| 386 | self.flush(child) |
| 387 | |
| 388 | def test_pdb_set_trace_kwargs(self, pytester: Pytester) -> None: |
| 389 | p1 = pytester.makepyfile( |
| 390 | """ |
| 391 | import pytest |
| 392 | def test_1(): |
| 393 | i = 0 |
| 394 | print("hello17") |
| 395 | pytest.set_trace(header="== my_header ==") |
| 396 | x = 3 |
| 397 | assert 0 |
| 398 | """ |
| 399 | ) |
| 400 | child = pytester.spawn_pytest(str(p1)) |
| 401 | child.expect("== my_header ==") |
| 402 | assert "PDB set_trace" not in child.before.decode() |
| 403 | child.expect("Pdb") |
| 404 | child.sendline("c") |
| 405 | rest = child.read().decode("utf-8") |
| 406 | assert "1 failed" in rest |
| 407 | assert "def test_1" in rest |
| 408 | assert "hello17" in rest # out is captured |
| 409 | self.flush(child) |
| 410 | |
| 411 | def test_pdb_set_trace_interception(self, pytester: Pytester) -> None: |
| 412 | p1 = pytester.makepyfile( |
nothing calls this directly
no test coverage detected