Hi,

if you have a nested module structure with nested conftest files
that (re)define the same fixture name, my expectation is that the
definition of the "closest" conftest file is used -- and usually this
works fine (yay! :-).

For example (please see the attached tarball), if
    * something/conftest.py defines fixture "one" as 1
    * something/submodule/conftest.py defines fixture "one" as 2
then I think this should mean that tests in
    * something and something/tests should get "1", while
    * something/submodule and something/submodule/tests should get "2"

However, this seems to depend on the current working directory or
something. If the py.test binary is in another directory, say next to
the sources, then:
    * "cd ..; py.test package" works, while
    * "py.test ../package" does not
(You can try these with the attached tarball by going into the runner
directory and calling "make working" or "make notworking").

Can somebody tell me what's going on here? Is this intentional? Am I
missing something?

Thanks for your help,
Wolfgang

Attachment: reproduction.tar.gz
Description: application/gzip

_______________________________________________
Pytest-dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pytest-dev

Reply via email to