ansible / mazer

Experimental Ansible Galaxy Content Manager
GNU General Public License v3.0
114 stars 18 forks source link

Fix test html coverage generation, stop chdir() in autouse test fixture #227

Closed alikins closed 5 years ago

alikins commented 5 years ago
SUMMARY

Fix test htmlcov, stop chdir() in autouse test fixture

The use_mazer_work_dir() pytest autouser fixture was doing a chdir() into tests/_mazer_work_dir so the default test mazer.yml could use relative paths.

But the chdir() broke things like where the htmlcoverage report gets written (it would end up in tests/_mazer_work_dir/htmlcov).

So remove that fixture, and just use relative paths from the top of the source tree where pytest is run to point to the test collections

Add a .galaxy_install_info for our test collection

Mostly just to remove some warnings if running pytest with --log-level=DEBUG

ISSUE TYPE
MAZER VERSION
name = mazer
version = 0.4.0
config_file = /home/adrian/.ansible/mazer.yml
uname = Linux, newswoop, 5.0.5-200.fc29.x86_64, #1 SMP Wed Mar 27 20:58:04 UTC 2019, x86_64
executable_location = /home/adrian/venvs/mazer040test/bin/mazer
python_version = 3.6.8 (default, Jan 27 2019, 09:00:23) [GCC 8.2.1 20181215 (Red Hat 8.2.1-6)]
python_executable = /home/adrian/venvs/mazer040test/bin/python
ADDITIONAL INFORMATION