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
Close
Hashes for pytest-filemarker-0.1.0rc1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 729b088ed2f0416d9ee2859a399f5434995ee0dbafe41b1d644654678888b55c |
|
MD5 | fc5a8829e2a53ceb22e9471430ee40a1 |
|
BLAKE2b-256 | e2363be40d1d6821076da1fdc1b7a1180ddd2ffc214c2a44d4535846ddb98b00 |
Close
Hashes for pytest_filemarker-0.1.0rc1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6dfeb70f0bd73b78bae297f0f0f08366a581b2aac8889b766f1e0a08ec4772a1 |
|
MD5 | 04e4fe5d8805c5a915aefbd58f387429 |
|
BLAKE2b-256 | fa7d387e3eb8be0c681dd1ac3ba63fea3d10ebdb39a11d7ca469302872c9d1d3 |