“py.test” vs “pytest” command

房东的猫 提交于 2019-12-02 19:58:57

To answer the question about the actual command (meaning the invocation of the tool on the command line) in a bit more detail:

The py.test invocation is the old and busted joint. pytest is the new hotness (since 3.0). py.test and pytest invocations will coexist for a long time I guess, but at some point py.test might be deprecated. So I would recommend to #dropthedot.

[...] so from pytest 3.0 we will supported and recommend use of pytest as the main command instead of py.test. It's possible that in future we will deprecate py.test and potentially even remove it.

-- Dave Hunt

Backwards compatibility is a very important concern for the pytest community, so the old way might never go away and it's not much of a maintenance burden to keep it anyway (it is just defined as a different entry point in setup.py).

Use pytest ... or even better the python -m pytest ....

You can forget about the old name, it's clearly a bug if you still spot it somewhere.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!