Skip to content

🔌 Pytest Plugin for Focusing while Test Cases are Made

License

Notifications You must be signed in to change notification settings

inTestiGator/pytest-focus

Repository files navigation

pytest-focus

pytest focus image

All Contributors Build Status PyPI codecov.io made-with-python code-style license-mit Codacy Badge

Welcome to pytest-focus, a pytest plugin designed to make you focus as you write test cases until they pass. This tool aims to help you stay on top of making all the test cases in your test suite pass by relaying which ones fail to pass as they are run and tested. Currently supports Linux, MacOS, and Windows 10 operating systems.

What is pytest-focus

The way that pytest-focus completes its task, is through the use of push notifications and a creation of a ToDo-list. As test cases fail, pytest-focus sends the user notifications in real time about tests that have failed. After all the tests have been checked, it creates a ToDo-list for the user to view in order to help people focus on immediate problems. Notifications will be sent detailing which test case failed when it happens.

Windows Users

If you use Windows, you need to run the command:

pip install win10toast

This will allow the push notifications to interact with the computers.

Mac Users

If you use a Mac, you need to run the command:

brew install terminal-notifier

Otherwise, if you choose to install via RubyGems, run the command:

[sudo] gem install terminal-notifier

Setup

You can install this plugin from PYPI and download dependencies by following the following commands:

pipenv install pytest-focus --dev
pipenv install --dev

Running pytest-focus

In order to run pytest-focus, run the following command:

pipenv run pytest --focus

Checks

The following checks are made on the project via these commands:

pipenv run pytest tests --cov-config pytest.cov --cov

  • The command above checks that the pytest test suite works and that the code coverage is not lowered when new additions are added

pipenv run black **/*.py --check

  • The command above checks that all .py python code adheres to the black code style

pipenv run flake8 **/*.py

  • The command above checks that all .py python code adheres to the standards of flake8

pipenv run pylint **/*.py

  • The command above checks that all .py python code adheres to the standards of pylint and gets rated "10/10"

mdl README.md

  • The command above checks that the README.md adheres to the markdown language and its syntax

Failure for these commands to pass will result in the build failing to pass Travis CI. Any build that does not pass this system will not be merged into the master branch.

Contributors

Thanks goes to these wonderful people (emoji key):

Matthew Baldeosingh
Matthew Baldeosingh

💻 📖 🤔 👀
Zachary Shaffer
Zachary Shaffer

💻 🤔 👀 💬
Alexander Yarkosky
Alexander Yarkosky

💻 🖋 📖 🚇 👀 🎨
Mohammad Khan
Mohammad Khan

💻 📖 🤔 👀 ⚠️ 📦
Joshua Yee
Joshua Yee

💻 📖 🤔 👀 ⚠️ 📦 🚇

This project follows the all-contributors specification. Contributions of any kind welcome!

About

🔌 Pytest Plugin for Focusing while Test Cases are Made

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages