We have several different styles of where/how to import fixtures in
- import directly inside the test code
- import in conftest.py
- import in fixtures modules
- For all of above, both 'import *' and importing specific fixtures
I think we should try to agree on a specific style and then follow it.
One drawback of importing directly in test/fixtures code is that it's
then impossible to override them in conftest.py.
A drawback of importing '*' and/or doing this in conftest.py is that
you might inadvertently import more than you want, or this might
happen eventually (after more stuff are added), that this makes it
harder to find what uses what, and that it risks unintended collisions
in names - as opposed to intended overrides.
A related issue is having to update many places if you add/change something.
If there is some kind of "best practices" document somewhere that
people are happy with, perhaps we should follow it. Otherwise, we
should come up with our own.
Personally I think I'd like to have a single file with all the
imports, of specific fixtures (not '*'), and import this file from
conftest.py of all the suites. Didn't actually try this and no idea
what complications it might bring.
Comments/ideas/opinions/decisions are welcome :-)
A kind reminder that oVirt conference call for papers closes in 20 days!
Looking forward to user stories, developers onboarding journeys,
integration stories, new features presentation, old features nobody knows
about because nobody presented them before and more you see fit.
You can find call for paper at
MANAGER, SOFTWARE ENGINEERING, EMEA R&D RHV
Red Hat EMEA <https://www.redhat.com/>
*Red Hat respects your work life balance. Therefore there is no need to
answer this email out of your office hours.*