【发布时间】:2018-06-11 18:46:25
【问题描述】:
根据pytest good practices doc,您的测试目录中不应该有__init__.py。
如果我删除 __init__.py 文件,pytest 找不到任何使用此命令的测试:
PYTHONPATH=../. py.test -m "slow" --color=yes -svv -f tests(使用sh tests/run_slow_tests.sh 调用)
我是一个相当有经验的 pytest 用户,但我仍然不知道如何在没有 __init__.py 的情况下运行我的测试。如果没有测试文件夹中的测试,如何运行测试?
【问题讨论】:
标签: pytest