All Projects → darrenburns → Pytest Clarity

darrenburns / Pytest Clarity

Licence: mit
A plugin to improve the output of pytest with colourful unified diffs

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Pytest Clarity

Pudb
Full-screen console debugger for Python
Stars: ✭ 2,267 (+984.69%)
Mutual labels:  pytest
Dtl
diff template library written by C++
Stars: ✭ 180 (-13.88%)
Mutual labels:  diff
Pytest Chinese Doc
pytest 官方文档的中文翻译,但不仅仅是单纯的翻译,也包含自己的理解和实践。
Stars: ✭ 192 (-8.13%)
Mutual labels:  pytest
Pytest Flask Sqlalchemy
A pytest plugin for preserving test isolation in Flask-SQLAlchemy using database transactions.
Stars: ✭ 168 (-19.62%)
Mutual labels:  pytest
Seleniumbase
A Python framework that inspires developers to become better test automation engineers. 🧠💡
Stars: ✭ 2,520 (+1105.74%)
Mutual labels:  pytest
Diffobj
Compare R Objects with a Diff
Stars: ✭ 188 (-10.05%)
Mutual labels:  diff
Expdevbadchars
Bad Characters highlighter for exploit development purposes supporting multiple input formats while comparing.
Stars: ✭ 167 (-20.1%)
Mutual labels:  diff
Swiftlcs
Swift implementation of the longest common subsequence (LCS) algorithm.
Stars: ✭ 207 (-0.96%)
Mutual labels:  diff
Vim Mergetool
🍰 Efficient way of using Vim as a Git mergetool
Stars: ✭ 179 (-14.35%)
Mutual labels:  diff
Htmlsimilarity
网页相似度判断:根据网页结构判断页面相似性 ,可用于相似度计算、越权检测等(Determine page similarity based on HTML page structure)
Stars: ✭ 189 (-9.57%)
Mutual labels:  diff
Docker Osm
A docker compose project to setup an OSM PostGIS database with automatic updates from OSM periodically
Stars: ✭ 172 (-17.7%)
Mutual labels:  diff
Pytest Lazy Fixture
It helps to use fixtures in pytest.mark.parametrize
Stars: ✭ 179 (-14.35%)
Mutual labels:  pytest
Split Diff
Side-by-side file compare for the Atom text editor.
Stars: ✭ 188 (-10.05%)
Mutual labels:  diff
Awesome Pytest
A curated list of awesome pytest resources
Stars: ✭ 170 (-18.66%)
Mutual labels:  pytest
Cookiecutter Cms
Python-centric Cookiecutter for Molecular Computational Chemistry Packages
Stars: ✭ 197 (-5.74%)
Mutual labels:  pytest
Mirrordiffkit
Graduation from messy XCTAssertEqual messages.
Stars: ✭ 168 (-19.62%)
Mutual labels:  diff
Cookiecutter Pytest Plugin
A Cookiecutter template for pytest plugins 💻
Stars: ✭ 181 (-13.4%)
Mutual labels:  pytest
Webdiff
Two-column web-based git difftool
Stars: ✭ 208 (-0.48%)
Mutual labels:  diff
Difference.rs
Rust text diffing and assertion library
Stars: ✭ 206 (-1.44%)
Mutual labels:  diff
Django Test Migrations
Test django schema and data migrations, including migrations' order and best practices.
Stars: ✭ 188 (-10.05%)
Mutual labels:  pytest

================= 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 plugin to improve the readability of pytest output.

Features

  • Enables an easier to parse and more understandable diff for your failing tests.
  • Can display unified diffs or split diffs, and chooses them depending on the context.
  • Adds helpful hints to the output for failing tests to help you track down common issues.

With pytest-clarity:

.. image:: https://raw.githubusercontent.com/darrenburns/pytest-clarity/master/pytest-clarity.png :alt: Example output with clarity

The same test, without pytest-clarity:

.. image:: https://raw.githubusercontent.com/darrenburns/pytest-clarity/master/without-clarity.png :alt: Example output without 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.

** The plugin will only be activated when the -vv option is supplied to pytest.**

You can choose which type of diff you want with :code:--diff-type (auto (default), split or unified):

::

pytest -vv --diff-type=split

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

::

pytest -vv --no-hints

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

::

pytest -vv --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.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter .. _@hackebrot: https://github.com/hackebrot .. _MIT: http://opensource.org/licenses/MIT .. _BSD-3: http://opensource.org/licenses/BSD-3-Clause .. _GNU GPL v3.0: http://www.gnu.org/licenses/gpl-3.0.txt .. _Apache Software License 2.0: http://www.apache.org/licenses/LICENSE-2.0 .. _cookiecutter-pytest-plugin: https://github.com/pytest-dev/cookiecutter-pytest-plugin .. _file an issue: https://github.com/darrenburns/pytest-clarity/issues .. _pytest: https://github.com/pytest-dev/pytest .. _tox: https://tox.readthedocs.io/en/latest/ .. _pip: https://pypi.org/project/pip/ .. _PyPI: https://pypi.org/project

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].