ansible/test
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
..
ansible_test
integration Return commands key instead of xml in result for junos rm (#62041) 2019-09-11 11:06:08 +05:30
legacy
lib/ansible_test Fix ansible-test pytest plugin loading. (#62119) 2019-09-10 23:27:05 -07:00
sanity Fix ansible-doc traceback and sanity test. (#62040) 2019-09-10 00:29:34 -07:00
units Allow the use of _paramiko_conn even if the connection hasn't been started. (#61570) 2019-09-09 16:59:20 -04:00
utils Revert "shippable: temporary bump the timeout for Azure jobs" 2019-09-09 18:17:25 -07:00