Browse Source

Merge "Fix driver tests on Windows"

changes/17/694717/3
Zuul 2 weeks ago
parent
commit
889f524660
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      nova/tests/fixtures.py

+ 9
- 0
nova/tests/fixtures.py View File

@@ -1067,6 +1067,15 @@ class PoisonFunctions(fixtures.Fixture):
def setUp(self):
super(PoisonFunctions, self).setUp()

try:
self._poison_libvirt_driver()
except ImportError:
# The libvirt driver uses modules that are not available
# on Windows.
if os.name != 'nt':
raise

def _poison_libvirt_driver(self):
# The nova libvirt driver starts an event thread which only
# causes trouble in tests. Make sure that if tests don't
# properly patch it the test explodes.

Loading…
Cancel
Save