You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test
Matt Clay 77c2139f7e [stable-2.9] Fix ansible-test pytest plugin loading. (#62119) (#62120)
* [stable-2.9] 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.
(cherry picked from commit aaa6d2e)

Co-authored-by: Matt Clay <matt@mystile.com>

* Add missing changelog entry for ansible-test fix.

PR https://github.com/ansible/ansible/pull/62119 was missing a changelog entry.

(cherry picked from commit 6c78f02121)
5 years ago
..
ansible_test Relocate ansible-test self tests outside package. (#61255) 5 years ago
integration Return commands key instead of xml in result for junos rm (#62041) 5 years ago
legacy Rename Azure modules: facts -> info (#61505) 5 years ago
lib/ansible_test [stable-2.9] Fix ansible-test pytest plugin loading. (#62119) (#62120) 5 years ago
sanity To fix and rename checkpoint to check_point due to legal reasons (#61872) 5 years ago
units Fix typesetting of "GitLab" (#61702) 5 years ago
utils [stable-2.9] Increase unit test timeout to account for long image download times (#61717) 5 years ago