Skip to main content

A pytest plugin that overrides the built-in exit codes to retain more information about the test results.

Project description

pytest-exit-code PyPi version Python versions

A pytest plugin that overrides the built-in exit codes to retain more information about the test results.

Features

This plugin changes the exit code returned by running pytest. The exit codes can range from 0 to 63 and are a combination of the following bitwise flags:

Flag Description
0 All tests passed.
1 One or more tests passed.
2 One or more tests failed.
4 One or more tests errored.
8 One or more tests were skipped.
16 One or more tests xfailed.
32 One or more tests xpassed.

So:

  • An exit code of 2 means that all tests failed.
  • An exit code of 6 means that all tests either failed or errored.
  • An exit code of 7 indicates that the result contains a mix of passed, failed and errored tests.

Installation

$ pip install python-exit-code

Contributing

Contributions are very welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.

License

Distributed under the terms of the Apache Software License 2.0 license, pytest-exit-code is free and open source software.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytest_exit_code-0.2.0.tar.gz (12.8 kB view details)

Uploaded Source

Built Distribution

pytest_exit_code-0.2.0-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file pytest_exit_code-0.2.0.tar.gz.

File metadata

  • Download URL: pytest_exit_code-0.2.0.tar.gz
  • Upload date:
  • Size: 12.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for pytest_exit_code-0.2.0.tar.gz
Algorithm Hash digest
SHA256 0dafcf72303d8a9fdc1c4241d864b68740035171fd0ef1c2c534824ece7b0e5d
MD5 b69114c05154c2d89c43c97bc286bd4e
BLAKE2b-256 7cb25dd8e2cd67cccc2076254f3a9ec10b94019773b35d96350fa8de7f21b0c4

See more details on using hashes here.

File details

Details for the file pytest_exit_code-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pytest_exit_code-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bd6a3a27abad77494c82c3dcf984b18f7c6ef6d1efb56c64f8ed7f2fe66a6ef7
MD5 d03817d1212dea207d615ae879e15b26
BLAKE2b-256 262923e88aa2f0d5fc5a0335f8b4a0971e494544afacd6b819e40f68316b486c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page