A pytest plugin that runs marked tests when files change.
Project description
pytest-filemarker
A pytest plugin that runs marked tests when files change.
Usage
Files should have a PYTEST_MARKS variable containing a list of marked tests to run when the files change.
PYTEST_MARKS = ['markone', 'marktwo']
class MyClass:
...
When this file has changed, any tests with marks markone or marktwo will be run.
To invoke the plugin, run:
pytest --filemarker-active
By default, the plugin will use git to look at the changes between HEAD and HEAD~1 to generate a list of files to inspect. To override this, use the --filemarker-files parameter:
pytest --filemarker-files=FILE1,FILE2
Options
filemarker:
--filemarker-active Should the plugin be active? Automatically set to True
if other options are specified.
--filemarker-files=FILE1,FILE2
Files to search. If not supplied will look at the latest
changes from git.
--filemarker-variable=VARIABLE
Variable which contains a list of marks. Defaults to
PYTEST_MARKS
filemarker-variable can also be set wherever you configure pytest (e.g. pytest.ini).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pytest-filemarker-0.1.0rc1.tar.gz.
File metadata
- Download URL: pytest-filemarker-0.1.0rc1.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.9.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
729b088ed2f0416d9ee2859a399f5434995ee0dbafe41b1d644654678888b55c
|
|
| MD5 |
fc5a8829e2a53ceb22e9471430ee40a1
|
|
| BLAKE2b-256 |
e2363be40d1d6821076da1fdc1b7a1180ddd2ffc214c2a44d4535846ddb98b00
|
File details
Details for the file pytest_filemarker-0.1.0rc1-py3-none-any.whl.
File metadata
- Download URL: pytest_filemarker-0.1.0rc1-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.9.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6dfeb70f0bd73b78bae297f0f0f08366a581b2aac8889b766f1e0a08ec4772a1
|
|
| MD5 |
04e4fe5d8805c5a915aefbd58f387429
|
|
| BLAKE2b-256 |
fa7d387e3eb8be0c681dd1ac3ba63fea3d10ebdb39a11d7ca469302872c9d1d3
|