-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
API Question: Configure pytest without running it #7309
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
Comments
there currently is no external api to configure pytest (and tbh, with how the pytest startup is currently lined up its very error prone to orchestrate i would like to change that, but its not as high as other details on my priority list since its going to be tricky and take a while |
In principle, yes I would be willing to work on this functionality. From my side there are two comments:
|
The Another option might be to make the hooks the official API, and rework them to make it easier to use. |
hooks are already an official api pytesters config object creation barely is good enough for testsuites, im hesitant to open it for more general consumption |
Hi pytest team,
I am developing the
ipytest
package, which allows you to runpytest
inside the notebook. Recently a question regarding the pytest API came up: is there some API to configure pytest without running it? I browsed the API docs but couldn't find an easy way and just wanted to make sure I did not overlook something. This issue is not breaking and hence resolving it is more a nice to have.The motivation: a user reported the issue, that
pytest.mark.parametrize
gives misleading error messages. The root cause for this behavior (see detailed description here) seems to be that the mark generator behaves differently when pytest is configured. Foripytest
, the tests are all defined beforepytest
is run (and configured). Therefore the error message of the mark generator is a little bit tricky to parse.The text was updated successfully, but these errors were encountered: