From f5561c65bc3707f1c3f5864ca129813183479b7c Mon Sep 17 00:00:00 2001 From: Alicia Cozine <879121+acozine@users.noreply.github.com> Date: Mon, 22 Apr 2019 09:59:21 -0500 Subject: [PATCH] Add example for full path on unit tests (#55243) (#55603) Docs: adds an example when a full path is needed for unit tests, with module_utils, etc. (cherry picked from commit a005dcfbbdf688e2a1dd40ae9aa1454bbc01100f) --- docs/docsite/rst/dev_guide/testing_units.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/docsite/rst/dev_guide/testing_units.rst b/docs/docsite/rst/dev_guide/testing_units.rst index 492059c6723..8daac2f6549 100644 --- a/docs/docsite/rst/dev_guide/testing_units.rst +++ b/docs/docsite/rst/dev_guide/testing_units.rst @@ -43,6 +43,11 @@ Or against a specific Python version by doing: ansible-test units --tox --python 2.7 apt +If you are running unit tests against things other than modules, such as module utilities, specify the whole file path: + +.. code:: shell + + ansible-test units --tox test/units/module_utils/basic/test_imports.py For advanced usage see the online help::