On 25 October 2017 at 09:54, RonnyPfannschmidt
<opensou...@ronnypfannschmidt.de> wrote:
> hi everyone,
>
> while reviewing the codebase i noticed, that the code that is ensuring
> we don't use conftests from other folders don't take into account
> `pytest_plugins` declared in such a conftest
> thus the plugin system gives a false impression.

I think I've always advised against using pytest_plugins in anything
else but the toplevel conftest.py.  I thought this was the de-facto
rule.

> intuitively i'd expect plugins listed in a conftest only to be active
> when that conftest is active

That seems somewhat twisted to me, not sure I like your intuition, but
I can see how you get there ;-)

> as such i propose deprecating them and warning users about the problems
> with regard to when and how to warn we need to take a look in detail as
> there are many reasonably valid setups with exactly one non initial conftest
> and we should help people to turn those into initial conftest's while
> cleaning out the rest.

Absolutely, if we can detect this and warn users away from it then
that sounds great.  It could go on the "removal in 4.0" list if such a
list existed.

Cheers,
Floris
_______________________________________________
pytest-dev mailing list
pytest-dev@python.org
https://mail.python.org/mailman/listinfo/pytest-dev

Reply via email to