Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/darrenburns/pytest-clarity
A plugin to improve the output of pytest with colourful unified diffs
https://github.com/darrenburns/pytest-clarity
diff pytest pytest-plugin python testing
Last synced: about 4 hours ago
JSON representation
A plugin to improve the output of pytest with colourful unified diffs
- Host: GitHub
- URL: https://github.com/darrenburns/pytest-clarity
- Owner: darrenburns
- License: mit
- Created: 2018-04-18T18:12:38.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-02-18T13:01:54.000Z (10 months ago)
- Last Synced: 2024-12-07T03:06:04.606Z (7 days ago)
- Topics: diff, pytest, pytest-plugin, python, testing
- Language: Python
- Homepage:
- Size: 1.08 MB
- Stars: 438
- Watchers: 13
- Forks: 23
- Open Issues: 10
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
- awesome-pytest - pytest-clarity - A plugin to improve the readability of pytest output. (Plugins)
README
=================
pytest-clarity
=================.. image:: https://img.shields.io/pypi/v/pytest-clarity.svg
:target: https://pypi.org/project/pytest-clarity
:alt: PyPI version
.. image:: https://img.shields.io/conda/vn/conda-forge/pytest-clarity.svg
:target: https://anaconda.org/conda-forge/pytest-clarity
:alt: conda-forge version.. image:: https://img.shields.io/pypi/pyversions/pytest-clarity.svg
:target: https://pypi.org/project/pytest-clarity
:alt: Python versions.. image:: https://travis-ci.org/darrenburns/pytest-clarity.svg?branch=master
:target: https://travis-ci.org/darrenburns/pytest-clarity
:alt: See Build Status on Travis CIA pytest plugin which brings the coloured diff output from the `Ward test framework `_ to pytest.
After
-----
.. image:: https://user-images.githubusercontent.com/5740731/121730571-c5387600-cae7-11eb-96eb-eaa6d4cfd09f.png
:alt: Example output with pytest-clarityBefore
------
.. image:: https://user-images.githubusercontent.com/5740731/121730569-c4074900-cae7-11eb-9416-47f02ca4ff82.png
:alt: Example output without pytest-clarityRequirements
------------Supports Python 3.6+.
Installation
------------You can install "pytest-clarity" via ``pip``::
$ pip install pytest-clarity
Usage
-----Install the plugin as described above.
The plugin will only be activated when the :code:`-vv` option is supplied to :code:`pytest`.
You can configure the width of the output with the :code:`--diff-width` option:
::
pytest -vv --diff-width=60
You can force `pytest-clarity` to show a symbolic diff with :code:`--diff-symbols`::
pytest -vv --diff-symbols