Skip to main content

============= pytest-sorter

.. image:: http://img.shields.io/pypi/v/pytest-sorter.svg :target: https://pypi.python.org/pypi/pytest-sorter

.. image:: https://travis-ci.org/AndreMicheletti/pytest-sorter.svg?branch=master :target: https://travis-ci.org/AndreMicheletti/pytest-sorter :alt: See Build Status on Travis CI

A simple plugin to first execute tests that historically failed more

This pytest_ plugin was generated with cookiecutter_ along with @hackebrot's cookiecutter-pytest-plugin template.

Description

This plugin will save a history of your tests executions in a file .test_history. For each test it will have how many times it was executed, and how many times it failed.

Using that information it will calculate the percentage of failure of tests, and order them to first execute the higher failure ratio

Requirements

  • Python>=3

Installation

You can install "pytest-sorter" via pip_ from PyPI_::

$ pip install pytest-sorter

Usage

After installed, your tests will automatically create and update the .test_history file, and order tests by their failure ratio.

You can tell pytest to ignore this plugin by passing:

pytest --no-sorted

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-sorter" is free and open source software

Issues

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

.. _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/AndreMicheletti/pytest-sorter/issues .. _pytest: https://github.com/pytest-dev/pytest .. _tox: https://tox.readthedocs.io/en/latest/ .. _pip: https://pypi.python.org/pypi/pip/ .. _PyPI: https://pypi.python.org/pypi

Metadata

Release files for pytest-sorter 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytest-sorter 0.3.1
File Size Uploaded
pytest-sorter-0.3.1.tar.gz 6.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pytest-sorter 0.3.1
File Interpreter ABI Platform
pytest_sorter-0.3.1-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 14.1 kB

Release files / pytest-sorter-0.3.1.tar.gz

Download URL pytest-sorter-0.3.1.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d6493f8963091b2e0566b575dab9e48920d0de9b61fce05c5b6ec2ca695ba050
BLAKE2b-256 checksum
How to use checksums
a7305e30b57f974e9acaff9359a24579be71b48220a99de243ad20a7634afc94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.20.0 setuptools/49.2.1 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.9

Release files / pytest_sorter-0.3.1-py2.py3-none-any.whl

Download URL pytest_sorter-0.3.1-py2.py3-none-any.whl
Size 8.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
cbf80904be388b61d921160d100e23ff504484e2d66d6503f97ad1d3d46b9d3c
BLAKE2b-256 checksum
How to use checksums
557ac77dd77d029e9ee50f34e4d4c233fee3c65008c71d0fc25f34c58f59e5e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.20.0 setuptools/49.2.1 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.9

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page