“py.test” vs “pytest” command

前端 未结 2 1547
猫巷女王i
猫巷女王i 2021-02-01 12:32

The py.test command is failing in my case, whereas pytest is running totally fine.

I use the pytest-flask plugin:

platform linu         


        
2条回答
  •  失恋的感觉
    2021-02-01 13:12

    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).

提交回复
热议问题