(self, pytester: Pytester)
| 420 | self.flush(child) |
| 421 | |
| 422 | def test_pdb_set_trace_kwargs(self, pytester: Pytester) -> None: |
| 423 | p1 = pytester.makepyfile( |
| 424 | class="st">""" |
| 425 | import pytest |
| 426 | def test_1(): |
| 427 | i = 0 |
| 428 | print(class="st">"hello17") |
| 429 | pytest.set_trace(header=class="st">"== my_header ==") |
| 430 | x = 3 |
| 431 | assert 0 |
| 432 | class="st">""" |
| 433 | ) |
| 434 | child = pytester.spawn_pytest(str(p1)) |
| 435 | child.expect(class="st">"== my_header ==") |
| 436 | assert class="st">"PDB set_trace" not in child.before.decode() |
| 437 | child.expect(class="st">"Pdb") |
| 438 | child.sendline(class="st">"c") |
| 439 | rest = child.read().decode(class="st">"utf-8") |
| 440 | assert class="st">"1 failed" in rest |
| 441 | assert class="st">"def test_1" in rest |
| 442 | assert class="st">"hello17" in rest class="cm"># out is captured |
| 443 | self.flush(child) |
| 444 | |
| 445 | def test_pdb_set_trace_interception(self, pytester: Pytester) -> None: |
| 446 | p1 = pytester.makepyfile( |
nothing calls this directly
no test coverage detected