Import external conftest.py #8046
-
We have a python package (Package A) that we maintain and is consumed by a large project. Package A does a bunch of stuff. Package A also has a conftest.py that we would like to import into the current project. from PackageA import conftest for example. It is easy to maintain conftest in Package A and don't want to make a separate plugin if it can be avoided. How can I make this happen? Simply importing this conftest into a root conftest.py in the current project does not seem to be enough to have pytest discover these fixtures. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Silly me, I was importing from PackageA import conftest but it should be from PackageA.conftest import * (or just what is needed) |
Beta Was this translation helpful? Give feedback.
Silly me, I was importing from PackageA import conftest but it should be from PackageA.conftest import * (or just what is needed)