(self, pytester: Pytester)
| 396 | |
| 397 | @pytest.mark.xfail(reason=class="st">"class="cm">#10042", strict=False) |
| 398 | def test_pdb_interaction_capturing_simple(self, pytester: Pytester) -> None: |
| 399 | p1 = pytester.makepyfile( |
| 400 | class="st">""" |
| 401 | import pytest |
| 402 | def test_1(): |
| 403 | i = 0 |
| 404 | print(class="st">"hello17") |
| 405 | pytest.set_trace() |
| 406 | i == 1 |
| 407 | assert 0 |
| 408 | class="st">""" |
| 409 | ) |
| 410 | child = pytester.spawn_pytest(str(p1)) |
| 411 | child.expect(rclass="st">"test_1\(\)") |
| 412 | child.expect(class="st">"i == 1") |
| 413 | child.expect(class="st">"Pdb") |
| 414 | child.sendline(class="st">"c") |
| 415 | rest = child.read().decode(class="st">"utf-8") |
| 416 | assert class="st">"AssertionError" in rest |
| 417 | assert class="st">"1 failed" in rest |
| 418 | assert class="st">"def test_1" in rest |
| 419 | assert class="st">"hello17" in rest class="cm"># out is captured |
| 420 | self.flush(child) |
| 421 | |
| 422 | def test_pdb_set_trace_kwargs(self, pytester: Pytester) -> None: |
| 423 | p1 = pytester.makepyfile( |
nothing calls this directly
no test coverage detected