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.dev3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52b1a171a64d7999c0303e01960661804a6bdd7c737599dd1b8ec9686ea71121 |
|
MD5 | d13756812839f9aab5dedbe7bc0fd2ca |
|
BLAKE2b-256 | 1fe69e4edf3b8df9888753c314cee08f7f3b7ee2f3aa92339ca3d659dcde8b42 |
Close
Hashes for pytest_filemarker-0.1.0.dev3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d2fc6c6b431f8fa7a73e05179348af8be677024dca3c4e6c394e165e77cda4d2 |
|
MD5 | 9d27f23178e126b467bf7338930aba4b |
|
BLAKE2b-256 | 01a403406ca2010c4290345074c655b14bdd548ae785b4e402106c88c892e07c |