UNKNOWN
Project description
The default py.test keyword filtering (-k) is _way_ too broad. You would think that it would be based on the MarkInfo objects that are described alongside the filter option but that would be incorrect. In fact, it chooses the method/function name of the script as well.
This plugin introduces a -f flag for pytest that takes the name of a MarkInfo object to either keep or remove from the collected scripts.
The syntax is the same as with -k. So…
To include a script with a MarkInfo object on it
py.test -f rhino
And to disclude one
py.test -f -hippo
Just like with -k you can do an ‘and’ collection as well with
py.test -f “hippo rhino”
or
py.test -f “hippo -rhino”
But the built-in -k does not let you do an ‘or’ collection. -f does allow for it though through multiple instances of he flag
py.test -f hippo -f rhino
and perhaps a silly example of
py.test -f hippo -f -rhino
To install, either * pip install pytest-markfiltration * python setup.py install
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file pytest_markfiltration-0.02-py2.7.egg
.
File metadata
- Download URL: pytest_markfiltration-0.02-py2.7.egg
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 788769914438ab3b4c74ccb1eb7c597785310d8fe96524f8f6ce43fad482af79 |
|
MD5 | 720c8ac5be2b820b4b192a6853fdea75 |
|
BLAKE2b-256 | 69802894d051e1e0e2a57439185e6cb63192f042e6a044947abab36fd8c5a056 |