sbm3
sbm3

Reputation: 1

pytest- unable to access fixtures in a parent directory

I have following dir structure and everything is running under virtual env.

- proddir
    |- testdir
         |- test_feature1
              |- test_create.py
         |- conftest.py
    |- libdir
         |- lib_feature1
               |- lib_create.py
    |- conftest.py

I am unable to access fixtures defined in conftest.py of proddir when I try to access it from test_create.py but able to access it when I use it in lib_create.py

Tried adding __init__.py to consider directories as package at all levels, but it is not working either.

Upvotes: 0

Views: 42

Answers (0)

Related Questions