Python 无法识别不同子文件夹中的Pytest装置
如果我有具有以下代码结构的回购协议:Python 无法识别不同子文件夹中的Pytest装置,python,pytest,Python,Pytest,如果我有具有以下代码结构的回购协议: repo/ -- test -- preprocess -- conftest.py -- test_preprocess.py -- classifier -- conftest.py -- test_classifier.py 如何调用test/preprocess/conftest.pytest\u classifier.py中定义的夹具?我试过了,但我的固定装置没有被识别。谢谢 回购/ repo/ -
repo/
-- test
-- preprocess
-- conftest.py
-- test_preprocess.py
-- classifier
-- conftest.py
-- test_classifier.py
如何调用test/preprocess/conftest.pytest\u classifier.py
中定义的夹具?我试过了,但我的固定装置没有被识别。谢谢 回购/
repo/
-- test
-- conftest.py <--- for fixtures shared for all subfolders' tests
-- preprocess
-- conftest.py
-- test_preprocess.py
-- classifier
-- conftest.py
-- test_classifier.py
--试验
--conftest.py