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.0.dev2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96842631d95f6c2469fff21f00b0d73fa25d540c358da7b8fefb87e53d3afbc7 |
|
MD5 | 204fbc28058370135308a1fe4ece60f1 |
|
BLAKE2b-256 | ba8635c4cbad4e68da3d19af8d0b8d0024c05c9d82a2279c5f3a9b68dfbca4f2 |
Close
Hashes for pytest_filemarker-0.1.0.dev2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a0a4a4281af210e59ed1455224f36ec32c27078522a16f5ad1417605645089b |
|
MD5 | 348bc978a056a1ecd27ffecc6b344e38 |
|
BLAKE2b-256 | c36175ecd2ffaf99f9f14f92a5d41800c62b710e4a2fb2484c97d4fd8afffe25 |