]> xenbits.xensource.com Git - osstest/openstack-nova.git/commitdiff
Avoid weird test error when mox is missing
authorThierry Carrez <thierry@openstack.org>
Thu, 2 Feb 2012 16:26:30 +0000 (17:26 +0100)
committerThierry Carrez <thierry@openstack.org>
Thu, 2 Feb 2012 16:29:05 +0000 (17:29 +0100)
Fail early if you can't import mox, rather than return
a cryptic and undecipherable error. Fixes bug 810424.

Change-Id: Ie56d3e7447bbba841fdc882cb1f8f70e234812ef

nova/tests/__init__.py

index 676518a4829d1f1d58271a1b8a4ae415dee91a51..02bc7789815707d69ba0d43d139ea440aa06d060 100644 (file)
@@ -37,6 +37,7 @@ setattr(__builtin__, '_', lambda x: x)
 
 
 def setup():
+    import mox  # Fail fast if you don't have mox. Workaround for bug 810424
     import os
     import shutil