(self, pytester: Pytester)
| 362 | result.stdout.fnmatch_lines(["-> import unknown"]) |
| 363 | |
| 364 | def test_pdb_interaction_capturing_simple(self, pytester: Pytester) -> None: |
| 365 | p1 = pytester.makepyfile( |
| 366 | """ |
| 367 | import pytest |
| 368 | def test_1(): |
| 369 | i = 0 |
| 370 | print("hello17") |
| 371 | pytest.set_trace() |
| 372 | i == 1 |
| 373 | assert 0 |
| 374 | """ |
| 375 | ) |
| 376 | child = pytester.spawn_pytest(str(p1)) |
| 377 | child.expect(r"test_1\(\)") |
| 378 | child.expect("i == 1") |
| 379 | child.expect("Pdb") |
| 380 | child.sendline("c") |
| 381 | rest = child.read().decode("utf-8") |
| 382 | assert "AssertionError" in rest |
| 383 | assert "1 failed" in rest |
| 384 | assert "def test_1" in rest |
| 385 | assert "hello17" in rest # out is captured |
| 386 | self.flush(child) |
| 387 | |
| 388 | def test_pdb_set_trace_kwargs(self, pytester: Pytester) -> None: |
| 389 | p1 = pytester.makepyfile( |
nothing calls this directly
no test coverage detected