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.
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.
If you use Windows, you need to run the command:
pip install win10toast
This will allow the push notifications to interact with the computers.
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
You can install this plugin from PYPI and download dependencies by following the following commands:
pipenv install pytest-focus --dev
pipenv install --dev
In order to run pytest-focus, run the following command:
pipenv run pytest --focus
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 offlake8
pipenv run pylint **/*.py
- The command above checks that all
.py
python code adheres to the standards ofpylint
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.
Thanks goes to these wonderful people (emoji key):
Matthew Baldeosingh 💻 📖 🤔 👀 | Zachary Shaffer 💻 🤔 👀 💬 | Alexander Yarkosky 💻 🖋 📖 🚇 👀 🎨 | Mohammad Khan 💻 📖 🤔 👀 | Joshua Yee 💻 📖 🤔 👀 |
This project follows the all-contributors specification. Contributions of any kind welcome!