MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_continue_on_collection_errors

Function test_continue_on_collection_errors

testing/test_collection.py:972–984  ·  view source on GitHub ↗

Verify tests are executed even when collection errors occur when the --continue-on-collection-errors flag is set

(pytester: Pytester)

Source from the content-addressed store, hash-verified

970
971
972def 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
987def test_continue_on_collection_errors_maxfail(pytester: Pytester) -> None:

Callers

nothing calls this directly

Calls 3

fnmatch_linesMethod · 0.80
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected