pytest-markfiltration

A plugin that introduces a -f flag for pytest
Download

pytest-markfiltration Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Publisher Name:
  • Adam Goucher
  • Publisher web site:
  • https://github.com/adamgoucher/

pytest-markfiltration Tags


pytest-markfiltration Description

A plugin that introduces a -f flag for pytest 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.pytest-markfiltration is a plugin that 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 itpy.test -f rhinoAnd to disclude onepy.test -f -hippoJust like with -k you can do an 'and' collection as well withpy.test -f "hippo rhino"orpy.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 flagpy.test -f hippo -f rhinoand perhaps a silly example ofpy.test -f hippo -f -rhinoTo install, either * pip install pytest-markfiltration * python setup.py install Requirements: · Python


pytest-markfiltration Related Software