Replies: 2 comments
-
I'm pretty sure that's the case, as it stands today. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Pytest configure is too late Your use case sounds like a horror for ux, if only scripts fill in those options, consider confi files |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Creating a batch of internal plugins is a common use case; these are registered internally using
pytest_plugins = (...)
in a top levelconftest.py
however when performing the following, is it possible to havepytest_addoption
invoked when a class is registered without complaining that no such arguments exist during CLI invocation. I think this is maybe called very early on during config preperation and this simple isn't possible? (they should live in the module as a function instead):Consider the above pseudo code, writing it from memory. Is it possible that Foo being registered here inside example.py where
conftest.py
contains apytest_plugins = ['some.path.to.example']
can allow the added options to be usable without having them be strictly set inexample.py
as a function hook implementation ofpytest_addoption
.Use case: I have a
meta
plugin that is responsible for registering various internal plugins, each of which have a lengthy list of options; I don't want to drag all the options intoexample.py
here just for them to work.Thanks!
Beta Was this translation helpful? Give feedback.
All reactions