pytest-snail
Plugin for adding a marker to slow running tests. 🐌
Installation
You can install pytest-snail via pip from PyPI:
pip install pytest-snail==0.1.0
Usage
When you run your tests, pytest-snail keeps track of test durations for each test item by test phase: setup, call, and teardown. ⏱
The next time you run your tests, pytest-snail adds a snail marker to
all test items with a recorded, accumulated duration that is equal or longer
than the value for the --snail CLI option (defaults to 5.0 seconds).
You can then use pytest's marker expressions to select or deselect tests.
Examples
First run your tests to measure test durations:
pytest
Then deselect all tests that take longer than 5.0 seconds to complete:
pytest -m "not snail"
Select only tests that take longer than 10.0 seconds to complete:
pytest --snail 10.0 -m snail
Community
Please check out the good first issue label for tasks, that are good candidates for your first contribution to pytest-snail. Your contributions are greatly appreciated! Every little bit helps, and credit will always be given!
You can also support the development of this project by volunteering to become a maintainer, which means you will be able to triage issues, merge pull-requests, and publish new releases. If you're interested, please submit a pull-request to add yourself to the list of maintainers and we'll get you started! 🚀
Please note that pytest-snail is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
License
Distributed under the terms of the MIT license, pytest-snail is free and open source software.
Metadata
Release files for pytest-snail 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pytest-snail-0.1.0.tar.gz | 4.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pytest_snail-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.2 kB
Release files / pytest-snail-0.1.0.tar.gz
| Download URL | pytest-snail-0.1.0.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6ca089aa6745ab88ce25ee30813559f5b1323806db9cbbf843e61f8cfb41b60f
|
|
BLAKE2b-256 checksum How to use checksums |
3a58f7ad1eae5a764a7bb850d609087f6a3e9563f5da6152f84de7585062950e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.6.9
|
Release files / pytest_snail-0.1.0-py3-none-any.whl
| Download URL | pytest_snail-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c3628d1c4a3b6a92738460d1b20069b05a6231354467712d81e37bb4e4602bd0
|
|
BLAKE2b-256 checksum How to use checksums |
f010fd49ef1bf55d2e8f95ae28807c2aa90721df60f9accbd1d896e8a57dbc6b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.6.9
|