{"body":"Unit tests\n----------\n\nYou can add unit tests for your module in ``./test/units/modules``. You can run them in a container as well. First, set up your development environment:\n\n``. hacking/env-setup``\n\nThen run the tests you want to run:\n\n``ansible-test --docker MODULE_NAME``\n\n.. note:: Ansible uses pytest for unit testing.\n\nTo run pytest against a single test module, you can do the following (provide the path to the test module appropriately):\n\n``$ pytest -r a --cov=. --cov-report=html --fulltrace --color yes\ntest/units/modules/.../test/my_test.py``\n","name":"draft replacement for Unit Tests section, see PR 62314","extension":"txt","url":"https://www.irccloud.com/pastebin/MueicMmg/draft+replacement+for+Unit+Tests+section%2C+see+PR+62314","modified":1573758008,"id":"MueicMmg","size":557,"lines":17,"own_paste":false,"theme":"","date":1573758008}