A plugin providing an alternative, colourful diff output for failing assertions.
Project Links
Meta
Author: Darren Burns
Maintainer: Darren Burns
Requires Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
Classifiers
Framework
- Pytest
Intended Audience
- Developers
Topic
- Software Development :: Testing
Programming Language
- Python
- Python :: 3.6
- Python :: 3.7
- Python :: 3.8
- Python :: 3.9
- Python :: Implementation :: CPython
Operating System
- OS Independent
License
- OSI Approved :: MIT License
A pytest plugin which brings the coloured diff output from the Ward test framework to pytest.
Before
After
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 -vv option is supplied to pytest.
You can configure the width of the output with the --diff-width option:
pytest -vv --diff-width=60
You can force pytest-clarity to show a symbolic diff with --diff-symbols:
pytest -vv --diff-symbols
1.0.1
Jun 11, 2021
1.0.0
Jun 11, 2021
0.3.0a0
Jan 23, 2020
0.2.0a1
Jul 11, 2019
0.1.0a1
Oct 18, 2018
Files in release
No dependencies