(stepwise_pytester: Pytester, stepwise_skip: str)
| 137 | |
| 138 | @pytest.mark.parametrize("stepwise_skip", ["--stepwise-skip", "--sw-skip"]) |
| 139 | def test_run_with_skip_option(stepwise_pytester: Pytester, stepwise_skip: str) -> None: |
| 140 | result = stepwise_pytester.runpytest( |
| 141 | "-v", |
| 142 | "--strict-markers", |
| 143 | "--stepwise", |
| 144 | stepwise_skip, |
| 145 | "--fail", |
| 146 | "--fail-last", |
| 147 | ) |
| 148 | assert _strip_resource_warnings(result.stderr.lines) == [] |
| 149 | |
| 150 | stdout = result.stdout.str() |
| 151 | # Make sure first fail is ignore and second fail stops the test run. |
| 152 | assert "test_fail_on_flag FAILED" in stdout |
| 153 | assert "test_success_after_fail PASSED" in stdout |
| 154 | assert "test_fail_last_on_flag FAILED" in stdout |
| 155 | assert "test_success_after_last_fail" not in stdout |
| 156 | |
| 157 | |
| 158 | def test_fail_on_errors(error_pytester: Pytester) -> None: |
nothing calls this directly
no test coverage detected