Hi all,
We have several different styles of where/how to import fixtures in
ovirt-system-tests:
- 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 :-)
Best regards,
--
Didi
_______________________________________________
Devel mailing list -- devel@ovirt.org
To unsubscribe send an email to devel-leave@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/
List Archives: https://lists.ovirt.org/archives/list/devel@ovirt.org/message/VAOD5Q7WU2FC66KF5GS3KXWPLCZ2KYS6/