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-name=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.dev1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 455cc0c916eb88fd0662e568698f6dbc6f4facab3cd12dd56fa990b0d93d7062 |
|
MD5 | 4075eb6dc17d39109c1e2961f1d6a387 |
|
BLAKE2b-256 | 4e36115947072b9debfd324a5cb9dae0640dacdb14e1c505850e44d7648114a6 |
Close
Hashes for pytest_filemarker-0.1.0.dev1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a9ae99b8b6482015a757e77d49e45c20dcaafe99b8bd265af1f2b67ab3acc1b |
|
MD5 | a001ecd8fb8ebd03dd452e618b021e68 |
|
BLAKE2b-256 | 4025eb2f160b1c33ef6195718c165e8f1a7ecee6ca83aea988f55726cb340555 |