--- id: pytest-custom-exit-code version: "0.3.0" license: MIT license_treatment: permissive maintenance: abandoned --- # pytest-custom-exit-code — Exit pytest test session with custom exit code in different scenarios License: permissive · Maintenance: abandoned · Downloads: 7.9M/mo ## What it is and what it does pytest-custom-exit-code is a pytest plugin that overrides the default exit codes pytest returns at the end of a test session. Normally, pytest exits with specific codes to signal test outcomes (e.g., 1 for failures, 5 for no tests collected). This plugin adds command-line flags to suppress or customize those exit codes in specific scenarios—for instance, to exit with 0 even when tests fail or when no tests are found, which can be useful in CI/CD pipelines where you want to handle test outcomes differently. The plugin depends only on pytest and installs as a wheel with no compiled dependencies. It is straightforward to use via command-line flags passed to pytest. However, the project has been abandoned since 2020, with no updates to support newer pytest or Python versions, so compatibility with current environments is uncertain. Use it for: - Suppress the exit code when pytest finds no tests, allowing CI pipelines to continue without treating it as a failure. - Suppress the exit code when tests fail, so your build system can decide how to handle test failures independently. - Integrate pytest into legacy CI/CD systems that expect different exit codes than pytest's defaults. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. A pytest plugin that lets you customize the exit code pytest returns when tests fail or when no tests are found, instead of using pytest's default exit codes. No. The package is abandoned (last update 2020) and compatibility with modern pytest and Python versions is unverified. If you need custom exit code handling, consider whether pytest's native exit codes meet your needs or explore actively maintained alternatives before relying on this plugin. ## Install pip install pytest-custom-exit-code uv add pytest-custom-exit-code poetry add pytest-custom-exit-code ## Installing pytest-custom-exit-code Before you install: Low friction to install, but the package is abandoned—last release was in 2019 and last commit in 2020. No recent maintenance or updates. License in practice: MIT license is permissive; you can use this freely in commercial and private projects with minimal restrictions. Quickstart: pip install pytest-custom-exit-code pytest --suppress-no-test-exit-code pytest --suppress-tests-failed-exit-code Verify before relying: - Whether the plugin works with modern pytest versions released after 2020. - Whether the two command-line options (suppress-no-test-exit-code, suppress-tests-failed-exit-code) are the only available customizations or if there are others. - Whether there are any known incompatibilities with current Python or pytest releases. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: abandoned - Downloads: 7.9M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags pytest exit code customization, pytest custom exit status, pytest suppress no tests exit code, pytest failed tests exit code, pytest plugin exit handling, pytest-plugin, ci-cd [View on SkillFed](https://skillfed.io/packages/pytest-custom-exit-code) · [View on PyPI](https://pypi.org/project/pytest-custom-exit-code/)