Metadata-Version: 2.4
Name: pytest-clarity
Version: 1.0.1
Summary: A plugin providing an alternative, colourful diff output for failing assertions.
Home-page: https://github.com/darrenburns/pytest-clarity
Author: Darren Burns
Author-email: darrenb900@gmail.com
Maintainer: Darren Burns
Maintainer-email: darrenb900@gmail.com
License: MIT
Classifier: Framework :: Pytest
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Testing
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Operating System :: OS Independent
Classifier: License :: OSI Approved :: MIT License
Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
License-File: LICENSE
Requires-Dist: pytest>=3.5.0
Requires-Dist: rich>=8.0.0
Requires-Dist: pprintpp>=0.4.0
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: maintainer
Dynamic: maintainer-email
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

=================
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 CI

A pytest plugin which brings the coloured diff output from the `Ward test framework <https://github.com/darrenburns/ward>`_ to pytest.

Before
------
.. image:: https://user-images.githubusercontent.com/5740731/121730571-c5387600-cae7-11eb-96eb-eaa6d4cfd09f.png
     :alt: Example output without pytest-clarity


After
-----
.. image:: https://user-images.githubusercontent.com/5740731/121730569-c4074900-cae7-11eb-9416-47f02ca4ff82.png
     :alt: Example output without pytest-clarity


Requirements
------------

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
