How do you configure Pytest to create a new Vagrant VM before each test and destroy it afterwards?
I'm trying to test a sysadmin tool based on Fabric (http://www.fabfile.org/), and so the tests need a fresh target server in a known state to login to. I tried implementing a Pytest plugin, similar to the Fabtools project ( https://github.com/ronnix/fabtools/blob/master/fabtools/tests/functional_tests/conftest.py) but it's unreliable. Each test seems to pass when I run them separately, but when I run all my tests together, there's some bug that's preventing the VM from being destroyed and re-created properly, causing many tests to fail when the previous test leaves the VM in an unexpected state. Has anyone else implemented similar tests with Pytest?
_______________________________________________ pytest-dev mailing list [email protected] https://mail.python.org/mailman/listinfo/pytest-dev
