pytest arugment error

Hi

Following the command in this manual

http://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general.html

When I run the following command

pytest -r a --cov=. --cov-report=html --fulltrace --color yes test/units/modules/…/test/my_new_test_module.py

the follow error message comes out.

pytest: error: unrecognized arguments: --cov=. --cov-report=html

Could you go through your shells’ history and reporter precisely which steps from that page you have performed? It looks like you’ve missed a step or two.

It is a single step.
I was following instructions from http://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general.html#unit-testing

You need to follow the other steps in that page to install the test dependencies, then. Just running the single pytest step won’t set up the environment to run the tests.

I had executed

. hacking/env-setup

And then I executed
pytest -r a --fulltrace --color yes ./mymoduletest/my_new_test_module.py
============================= test session starts ==============================
platform linux – Python 3.4.5, pytest-3.2.3, py-1.4.34, pluggy-0.4.0
rootdir: /root/work, inifile:
collected 0 items

========================= no tests ran in 0.01 seconds =========================e

But when I execute
pytest -r a --cov=. --cov-report=html --fulltrace --color yes ./mymoduletest/my_new_test_module.py
I get
pytest: error: unregnoized arguements: --cov=. --cov-report=html
infile: None
rootdir: /root/work

You need to pip install the test requirements as well.