标签: python pytest
我想使用here中所述的pytest的doctest + fixtures功能。
不幸的是,除非文件名带有pytest --doctest-modules前缀,否则test_似乎在文件中找不到固定装置。我意识到我可以在python_files = *.py中设置setup.cfg,但这大概会减慢测试运行程序的速度。
pytest --doctest-modules
test_
python_files = *.py
setup.cfg
有更好的解决方案吗?