Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to register custom mark in my library? #5972

Closed
ddidier opened this issue Oct 16, 2019 · 1 comment

Comments

@ddidier
Copy link

@ddidier ddidier commented Oct 16, 2019

Hi,
I'm developing a small library with custom marks and I see a lot of PytestUnknownMarkWarning when testing it and using it. I know that this is the intended behavior and that the marks should be declared in the importing project (in pytest.ini and conftest.py), but is there a way to declare them in the library itself, so that the library users have no need to do so?
Thanks

@RonnyPfannschmidt

This comment has been minimized.

Copy link
Member

@RonnyPfannschmidt RonnyPfannschmidt commented Oct 16, 2019

https://github.com/pytest-dev/pytest-forked/blob/dd42fd1861201536f985be7075f8cd869e17179c/src/pytest_forked/__init__.py#L32-L36 has an example of a recent addition in a plugin

this can also be done in pytest_configure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.