Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
您可以使用-k过滤掉某个名称模式/谓词之后的测试,但是您可以过滤掉某个包或目录下的测试吗?没有在文档中发现任何相关标志,但也许我遗漏了一些东西。
-k
您可以将位置指定为 py.test 的参数:
py.test test/comp_1/
当然你也可以把它和-kswitch 结合起来:
py.test -k slow test/comp_1/
这能回答你的问题吗?