Skip to main content

A pytest plugin helps developers to debug by providing useful commits history.

Project description

pytest-blame

logo


Build Status codecov.io made-with-python PyPI version gitter-join-chat

A pytest plugin that helps developers build successful test cases by providing them with GitHub commit information when their test cases fail.

A Python Plugin for Tracking Test Case Status


Everyone uses pytest. Or at least, everyone should. It's a super useful testing program with an easy-to-use syntax. Pytest Blame is a pytest plugin that allows pytest to do a quick check to Github to make sure the most recent commit is passing your cases. If somebody broke your cases, pytest-blame will display all the commits pushed since the build broke as well as who pushed each commit. This keeps team workflow transparent and allows for semi-realtime updates from Github without having to open a browser. Since pytest-blame can check up on the online repository as frequently as every time you run your test suite, there is less risk of a broken commit going unnoticed until a merge conflict occurs.

Installation


To install pytest-blame you will need to clone this github repository. Once the repository has been cloned you will need to run the install script to update your pytest configuration:

pipenv run python setup.py install

After pytest-blame has been successfully installed you will need to generate a Github User Token.

This can be found underSettings in your github profile:

key1 gif

Find Developer Settings in the dashboard on the left and navigate to Personal Access Tokens

key2 gif

Finally, when generating the key for pytest-blame make sure to include rights to repo and hooks

key3 gif

Now that you have a user token, you will need to paste it into the location where your terminal is sourced from. For example: Ubuntu uses bash, so the default terminal source for ubuntu is .bashrc.

run pytest with the --track flag and you will see a report containing GitHub information at the top of your pytest report. pytest-blame will display the number of test cases that passed in the latest commit to GitHub, so you can compare it with your current rate.

To run: Running pytest --track tests/ will invoke pytest-blame, which will display the current status of your working branch in the pytest header.

Sample output


A successful pytest-blame run will look something like this:

pytest --track tests

The Team

Check out the Pytest Blame Team!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytest-blame-0.1.6.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

pytest_blame-0.1.6-py3-none-any.whl (19.8 kB view details)

Uploaded Python 3

File details

Details for the file pytest-blame-0.1.6.tar.gz.

File metadata

  • Download URL: pytest-blame-0.1.6.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

File hashes

Hashes for pytest-blame-0.1.6.tar.gz
Algorithm Hash digest
SHA256 10b492048d3690cdb0ca34d7363cf002d6a2759a456269e299cff7146a499c96
MD5 a97bd9a3908fda562eb7d205abf0933f
BLAKE2b-256 946ba9315dce393322f5a5e7f5b6811c277e808d4e5d1774cf821d321c77b53a

See more details on using hashes here.

File details

Details for the file pytest_blame-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: pytest_blame-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 19.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

File hashes

Hashes for pytest_blame-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 1e1de3370f667902d9f6807de1c887791b8fc6927f4c86d75b6378279c68862c
MD5 3a7cdab45f56c2554876b32fb890a28c
BLAKE2b-256 480666a1629338156894b13cc4d2733f3a4e6493ff85f0e4887b4e8502bb6049

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page