'py.test: error: unrecognized arguments: --cov-report --cov=

I am running this test case command below

py.test --cov-report term-missing --cov=pipelines/core/comp/plugins/abc/ --noconftest pipelines/core/comp/test/plugins/abc/test_abc_crawler_task.py -vv

But getting the following error :

usage: py.test [options] [file_or_dir] [file_or_dir] [...]
py.test: error: unrecognized arguments: --cov-report --cov=pipelines/core/comp/plugins/abc/ pipelines/core/comp/test/plugins/abc/test_abc_v4_crawler_task.py
  inifile: /home/udocker/piper/pytest.ini
  rootdir: /home/udocker/piper


Solution 1:[1]

You need to install pytest-cov with

pip3 install pytest-cov

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 hackinghorn