(self, pytester: Pytester)
| 1049 | |
| 1050 | class TestTraceOption: |
| 1051 | def test_trace_sets_breakpoint(self, pytester: Pytester) -> None: |
| 1052 | p1 = pytester.makepyfile( |
| 1053 | """ |
| 1054 | def test_1(): |
| 1055 | assert True |
| 1056 | |
| 1057 | def test_2(): |
| 1058 | pass |
| 1059 | |
| 1060 | def test_3(): |
| 1061 | pass |
| 1062 | """ |
| 1063 | ) |
| 1064 | child = pytester.spawn_pytest("--trace " + str(p1)) |
| 1065 | child.expect("test_1") |
| 1066 | child.expect("Pdb") |
| 1067 | child.sendline("c") |
| 1068 | child.expect("test_2") |
| 1069 | child.expect("Pdb") |
| 1070 | child.sendline("c") |
| 1071 | child.expect("test_3") |
| 1072 | child.expect("Pdb") |
| 1073 | child.sendline("q") |
| 1074 | child.expect_exact("Exit: Quitting debugger") |
| 1075 | rest = child.read().decode("utf8") |
| 1076 | assert "= 2 passed in" in rest |
| 1077 | assert "reading from stdin while output" not in rest |
| 1078 | # Only printed once - not on stderr. |
| 1079 | assert "Exit: Quitting debugger" not in child.before.decode("utf8") |
| 1080 | TestPDB.flush(child) |
| 1081 | |
| 1082 | def test_trace_with_parametrize_handles_shared_fixtureinfo( |
| 1083 | self, pytester: Pytester |
nothing calls this directly
no test coverage detected