Skip to main content

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

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

pytest_markfiltration-0.7-py2.7.egg (5.1 kB view details)

Uploaded Source

File details

Details for the file pytest_markfiltration-0.7-py2.7.egg.

File metadata

File hashes

Hashes for pytest_markfiltration-0.7-py2.7.egg
Algorithm Hash digest
SHA256 30db064d293588d6fb26695d9ff82c3f113d173112c9206cdce59d894816d8ab
MD5 fcd06e6ff1c4323c0b9478817389f4a1
BLAKE2b-256 313de73981623f3c14abe972179f4b802e8349d16f8e3b9e2237f871a5c0cc33

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page