ansible/test/lib/ansible_test/_internal
Matt Clay aaa6d2ecb0
Fix ansible-test pytest plugin loading. (#62119)
* Avoid assertion rewriting in pytest plugins.

Adding PYTEST_DONT_REWRITE to the ansible-test pytest plugin docstrings disables assertion rewriting in pytest for those plugins.

This avoids warnings during test execution if the plugins are loaded multiple times (such as being imported within tests).

* Run ansible-test pytest plugins early.

The ansible-test pytest plugins need to load and run earlier than conftest modules.

To facilitate this, the pytest_configure function is run during loading, which works since they are loaded (but not always run) before conftest modules are loaded.

A check has also been added to the pytest_configure functions to prevent them from running multiple times in the same process.

* Load pytest plugins using an env var.

The -p command line option loads plugins before conftest, but only during collection.
The PYTEST_PLUGINS environment variable loads plugins before confest, both during collection and test execution.
2019-09-10 23:27:05 -07:00
..
cloud ansible-test: vcenter+Worldstream: hide password 2019-09-03 10:34:34 -04:00
integration Update collections integration targets path. (#61523) 2019-08-29 03:39:03 -07:00
provider Fix ansible-test to ignore tests/output/. (#62084) 2019-09-10 15:49:40 -07:00
sanity Fix ansible-doc traceback and sanity test. (#62040) 2019-09-10 00:29:34 -07:00
units Fix ansible-test pytest plugin loading. (#62119) 2019-09-10 23:27:05 -07:00
__init__.py
ansible_util.py Overhaul ansible-test test path handling. (#61416) 2019-08-27 23:40:06 -07:00
cache.py
changes.py
classification.py More ansible-test path handling updates. (#61484) 2019-08-28 15:13:00 -07:00
cli.py Add a --venv option to ansible-test. (#61422) 2019-08-28 09:10:17 -07:00
config.py Add a --venv option to ansible-test. (#61422) 2019-08-28 09:10:17 -07:00
constants.py
core_ci.py Overhaul ansible-test test path handling. (#61416) 2019-08-27 23:40:06 -07:00
cover.py Fix ansible-test coverage --all (#62115) 2019-09-11 15:12:38 +10:00
coverage_util.py Properly exclude tests/output/ from code coverage. 2019-09-10 15:50:22 -07:00
csharp_import_analysis.py Change collection PS util import pattern (#61307) 2019-08-27 16:02:27 -07:00
data.py More ansible-test path handling updates. (#61484) 2019-08-28 15:13:00 -07:00
delegation.py Fix issues with ansible-test --venv option. (#62033) 2019-09-09 18:32:29 -07:00
diff.py
docker_util.py
env.py Overhaul ansible-test test path handling. (#61416) 2019-08-27 23:40:06 -07:00
executor.py Update collections integration targets path. (#61523) 2019-08-29 03:39:03 -07:00
git.py ansible-test - Continue if the git command returns an error (#61605) 2019-08-30 12:03:39 -07:00
http.py
import_analysis.py More ansible-test path handling updates. (#61484) 2019-08-28 15:13:00 -07:00
init.py
manage_ci.py Move ansible-test coverage config to test/lib/ 2019-08-07 18:32:46 -07:00
metadata.py Overhaul ansible-test test path handling. (#61416) 2019-08-27 23:40:06 -07:00
payload.py Support delegation testing collections with deps. 2019-08-27 07:29:42 -07:00
powershell_import_analysis.py Change collection PS util import pattern (#61307) 2019-08-27 16:02:27 -07:00
target.py Update collections integration targets path. (#61523) 2019-08-29 03:39:03 -07:00
test.py Show doc URL for sanity test failures 2019-08-28 15:32:31 -07:00
thread.py
types.py Overhaul ansible-test test path handling. (#61416) 2019-08-27 23:40:06 -07:00
util.py ansible-test - Continue if the git command returns an error (#61605) 2019-08-30 12:03:39 -07:00
util_common.py Fix issues with ansible-test --venv option. (#62033) 2019-09-09 18:32:29 -07:00
venv.py Work around virtualenv/venv issue in ansible-test. (#62111) 2019-09-10 19:27:12 -07:00