"py.test somepath" 和 "py.test --pyargs pkg" 有什么区别

What is the difference between "py.test somepath" and "py.test --pyargs pkg"

我不太明白这两者之间的区别。

1) py.test somepath # 运行 所有测试都低于 somepath

2) py.test --pyargs pkg # 运行 在 pypkg

目录下找到的所有测试

对我来说,这两个都是用来运行指定路径下的所有测试用例。

有区别吗?

据我所知,唯一的区别是 --pyargs 如果您不知道包的路径,例如如果你 pip-installed 它。