(stepwise_pytester: Pytester)
| 166 | |
| 167 | |
| 168 | def test_change_testfile(stepwise_pytester: Pytester) -> None: |
| 169 | result = stepwise_pytester.runpytest( |
| 170 | "-v", "--strict-markers", "--stepwise", "--fail", "test_a.py" |
| 171 | ) |
| 172 | assert _strip_resource_warnings(result.stderr.lines) == [] |
| 173 | |
| 174 | stdout = result.stdout.str() |
| 175 | assert "test_fail_on_flag FAILED" in stdout |
| 176 | |
| 177 | # Make sure the second test run starts from the beginning, since the |
| 178 | # test to continue from does not exist in testfile_b. |
| 179 | result = stepwise_pytester.runpytest( |
| 180 | "-v", "--strict-markers", "--stepwise", "test_b.py" |
| 181 | ) |
| 182 | assert _strip_resource_warnings(result.stderr.lines) == [] |
| 183 | |
| 184 | stdout = result.stdout.str() |
| 185 | assert "test_success PASSED" in stdout |
| 186 | |
| 187 | |
| 188 | @pytest.mark.parametrize("broken_first", [True, False]) |
nothing calls this directly
no test coverage detected