Skip to main content

A plugin providing an alternative, colourful diff output for failing assertions.

Project description

PyPI version Python versions See Build Status on Travis CI

A plugin to improve the readability of pytest output.

Features

  • Enables an easier to parse and more understandable diff for your failing tests.

  • Adds hints to the output for failing tests to help you track down common issues.

Example output with clarity

Requirements

Supports Python 2.7 and 3.4+

Installation

You can install “pytest-clarity” via pip from PyPI:

$ pip install pytest-clarity

Usage

Install the plugin as described above, and it will automatically enabled.

You can disable hints using the --no-hints flag:

pytest --no-hints

You can configure the width of the output with the --diff-width option:

pytest --diff-width=60

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 MIT license, “pytest-clarity” is free and open source software

Issues

If you encounter any problems, please file an issue along with a detailed description.

This pytest plugin was generated with Cookiecutter along with @hackebrot’s cookiecutter-pytest-plugin template.

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-clarity-0.1.0a1.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

pytest_clarity-0.1.0a1-py2-none-any.whl (7.5 kB view details)

Uploaded Python 2

File details

Details for the file pytest-clarity-0.1.0a1.tar.gz.

File metadata

  • Download URL: pytest-clarity-0.1.0a1.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.14.2 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.27.0 CPython/2.7.10

File hashes

Hashes for pytest-clarity-0.1.0a1.tar.gz
Algorithm Hash digest
SHA256 8d6a36310e1babd019feed33d047284d129f05104cd78eb6e0d22d841839ebfb
MD5 3c13ad46e4dc0946255425a619a9fb82
BLAKE2b-256 d51fcf5c230595bfdb72b120170e5c20daad880c499da2b8decdb10170a3f459

See more details on using hashes here.

File details

Details for the file pytest_clarity-0.1.0a1-py2-none-any.whl.

File metadata

  • Download URL: pytest_clarity-0.1.0a1-py2-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.14.2 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.27.0 CPython/2.7.10

File hashes

Hashes for pytest_clarity-0.1.0a1-py2-none-any.whl
Algorithm Hash digest
SHA256 f6499b9215253bb733e7bc68ab3068fef7b5e20f93bce26c7471907fa8f1f451
MD5 6cbecde52f5fd0eb796fa1733318bca0
BLAKE2b-256 824d82be695a69fe0f89dfee969eb304ddbe250efa934f62cba642b86df65cb1

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