假设在这个例子中,如何config.json在conftest使用pytest.
$ pwd
/home/user/repo/main
$ pytest testcases/project_(1/2)/test_suite_(1/2).py
Run Code Online (Sandbox Code Playgroud)
目录结构:
??? main
? ??? conftest.py # conftest file for my fixtures
? ??? testcases
? ??? project_1
? ? (contains these files -- test_suite_1.py, config.json)
? ??? project_2
? (contains these files -- test_suite_2.py, config.json)
??? workflows
? ??? libs
Run Code Online (Sandbox Code Playgroud)