ansible/ansible — pull request #5461 by sivel (2013-12-30 20:57:00+00:00)
Title: Add -I/--interpreter argument to test-module

When developing a module in a virtual environment, potentially with a python module dependency that is only installed in the virtual environment, test-module will fail to operate correctly.

This change adds a `-I` and `--interpeter` argument, to allow you to specify the interpreter that `module_common.ModuleReplacer.modify_module` will use when building the module.

The value is `key=value` formatted, where the key is the interpreter type, which can either be full or short form:

1. ansible_python_interpreter
1. python

And the value it the path to the interpreter.

Example:

`hacking/test-module -I ansible_python_interpreter=/usr/local/bin/python2.7 -m newmodule`

or using short form for the interpreter to save keystrokes:

`hacking/test-module -I python=/usr/local/bin/python2.7 -m newmodule`