Source code for cfme.markers.crud
"""crud: Marker for marking the test as a CRUD test (crud)
Useful for eg. running only crud tests.
Tests will be marked automatically if:
* their name starts with crud_
* their name ends with _crud
* their name contains _crud_
"""
import re
matcher = re.compile(r'^crud_|_crud_|_crud$')
marker = "crud"
[docs]def pytest_itemcollected(item):
if matcher.search(item.name) is not None:
item.add_marker(marker)
item.extra_keyword_matches.add(marker)