Verify tests are executed even when collection errors occur when the --continue-on-collection-errors flag is set
(pytester: Pytester)
| 970 | |
| 971 | |
| 972 | def test_continue_on_collection_errors(pytester: Pytester) -> None: |
| 973 | """ |
| 974 | Verify tests are executed even when collection errors occur when the |
| 975 | --continue-on-collection-errors flag is set |
| 976 | """ |
| 977 | pytester.makepyfile(**COLLECTION_ERROR_PY_FILES) |
| 978 | |
| 979 | res = pytester.runpytest("--continue-on-collection-errors") |
| 980 | assert res.ret == 1 |
| 981 | |
| 982 | res.stdout.fnmatch_lines( |
| 983 | ["collected 2 items / 2 errors", "*1 failed, 1 passed, 2 errors*"] |
| 984 | ) |
| 985 | |
| 986 | |
| 987 | def test_continue_on_collection_errors_maxfail(pytester: Pytester) -> None: |
nothing calls this directly
no test coverage detected