How to tell py.test to skip certain directories?

后端 未结 8 1402
情话喂你
情话喂你 2021-02-06 20:07

I tried to use the norecursedirs option inside setup.cfg to tell py.test not to collect tests from certain directories but it seems it does ignore it.

[tool:pyte         


        
8条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-06 20:45

    If you have several directories with different parents you can specify different --ignore parameters:

    py.test --ignore=somedir --ignore=otherdir --ignore=etcdir

    • new option: --ignore will prevent specified path from collection.
      Can be specified multiple times.

提交回复
热议问题