On 25 December 2017 at 21:33, Stephen Nesbitt <[email protected]>
wrote:

> NOOB alert!  I'm struggling to setup a module development environment that
> includes support for unit tests and which the module development
> environment does not occur within the Ansible source tree directly. That is:
>
>    - My module development environment  is an Intellij project with a
>    project root at /dev/ansible. Relative to this project root, my module
>    sources are located in modules/packaging/os/snaps.py while my unit tests
>    are in test/units/modules/packaging/os.test_snaps.py
>    - The Ansible source lives in /dev/sdks/ansible2.4 which contains a
>    clone of the Ansible repository
>
> I've tried the following without success:
>
>    - Add test/units/modules and modules to the PYTHONPATH
>    - source sdks/ansible2.4/hacking/env-setup
>    - sdks/ansible2.4/test/runner/ansible-tests units --tox --python 3.5
>    snaps
>
>
>    - symbolically link modules/packaging/os/snaps.py into the
>    ansible2.4/lib/ansible/modules/packaging/os and symbolically link
>    test/units/modules/packaging/os.test_snaps.py into
>    ansible2.4/test/units/modules/packaging/os/test_snaps.py
>    - source sdks/ansible2.4/hacking/env-setup
>    - sdks/ansible2.4/test/runner/ansible-tests units --tox --python 3.5
>    snaps
>
> In neither case is my test case found (Target pattern no matched: snaps)
>
> Would anyone share how to setup a unit testing supporting module
> development environment?
>
> Thx,
>
> -steve
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>


​Did you check

http://docs.ansible.com/ansible/latest/intro_installation.html#running-from-source

and

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


Serge

​

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to