pytest-ignore-test-results is a pytest plugin that enables selective test result ignoring while maintaining test execution. It allows users to specify test cases (by name or pattern) whose failures should not result in a non-zero exit code from pytest. The current version is 0.3.0, and it is actively maintained by Espressif, with releases occurring as needed for updates and new features.
pip install -U pytest-ignore-test-resultsVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to use `pytest-ignore-test-results` via command-line arguments to selectively ignore test failures. It shows how to specify individual test cases or patterns, load ignore lists from files, and control exit codes for CI/CD pipelines. Note that ignored tests still execute.
Understand the difference: use `@pytest.mark.skip` or `pytest --ignore` for tests that should not run, and `pytest-ignore-test-results` for tests that must run but whose failures should not break the build.
Use the `--strict-exit-code` option if you want `pytest` to exit with a specific non-zero code (e.g., 6) when all actual failures have been ignored by the plugin. This provides a clear signal in CI/CD that issues were present but suppressed.
Only use `--ignore-no-tests-collected` when you explicitly expect zero tests in a given run, such as in conditional test environments. Otherwise, investigate why tests are not being collected.