Reputation: 170698
I want to add some manual markers to the discovered tests I am doing at https://github.com/pycontribs/pytest-molecule/blob/master/pytest_molecule/init.py#L53
Mainly I want to conditionally add the "foo" mark so some of the discovered tests but I was not able to find any documentation on how to do it with classes based on pytest.Item
.
Upvotes: 4
Views: 2903
Reputation: 170698
Nevermid, I found:
self.add_marker('foo')
This works because Item inherits Node which has this method.
Upvotes: 4