Question:
Is it possible to put the conftest.py
file into another package next to Test package as below structure?
Description
The project structure is as following:
--------------------------------------
GUI_pytest
- C_lib
--__init__.py
-- conftest.py
- G_test<br/>
--__init__.py
-- test_2.py
Source_Root: GUI_pytest
conftest.py: GUI_pytest/C_lib(package)
test_2.py(test file): GUI_pytest/G_test(package)
GUI_pytest/C_lib/conftest.py
:
there is a fixture function as def a()
test case: GUI_pytest/G_test/test_2.py
uses the fixture as def test_2(a)
I want to split the conftest.py
and test_case().py
into C_lib package
and G_test package
But the pytest seems not able to pick up the conftest.py file
Error not finding the fixture function a
used by def test_2(a)
Thank you in advance
As a beginning learner, anything is welcome for helping this out.