You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having lower level conftest files which provide subpackage specific pytest fixtures is the recommended way of doing it. ref
I agree it can be a little magic as you have to look for conftest files to see where your fixtures are coming from, but I think it would cause more issues to try and work around pytest (pytest is sufficiently magic you are better off accepting the magic and becoming one with it than fighting against it imo).
I do wonder if the very top most level conftest.py file should be removed, I know pytest has been deprecating stuff in there because the behaviour is ill defined.
Really? I thought it is the other way around? I remember pytest chastising me in another package for having lower level conftest.py and implored me to use root-level one.
Besides, we need the root-level one to run pytest ... from root level during dev testing locally.
Activity
Cadair commentedon May 5, 2020
Having lower level conftest files which provide subpackage specific pytest fixtures is the recommended way of doing it. ref
I agree it can be a little magic as you have to look for conftest files to see where your fixtures are coming from, but I think it would cause more issues to try and work around pytest (pytest is sufficiently magic you are better off accepting the magic and becoming one with it than fighting against it imo).
I do wonder if the very top most level
conftest.pyfile should be removed, I know pytest has been deprecating stuff in there because the behaviour is ill defined.pllim commentedon May 5, 2020
Really? I thought it is the other way around? I remember
pytestchastising me in another package for having lower levelconftest.pyand implored me to use root-level one.Besides, we need the root-level one to run
pytest ...from root level during dev testing locally.Cadair commentedon May 6, 2020
🤷
pllim commentedon Jun 17, 2020
I think @astrofrog said something about the test runner. Ah well.