Просмотр исходного кода

Merge branch 'master' of https://github.com/CloudVE/cloudbridge

almahmoud 7 лет назад
Родитель
Сommit
a1dafa86d4
2 измененных файлов с 6 добавлено и 1 удалено
  1. 4 1
      cloudbridge/cloud/factory.py
  2. 2 0
      docs/topics/testing.rst

+ 4 - 1
cloudbridge/cloud/factory.py

@@ -69,7 +69,10 @@ class CloudProviderFactory(object):
         """
         for _, modname, _ in pkgutil.iter_modules(providers.__path__):
             log.debug("Importing provider: %s", modname)
-            self._import_provider(modname)
+            try:
+                self._import_provider(modname)
+            except Exception as e:
+                log.warn("Could not import provider: %s", e)
 
     def _import_provider(self, module_name):
         """

+ 2 - 0
docs/topics/testing.rst

@@ -73,6 +73,8 @@ may incur costs. For the AWS cloud, there is also a mock provider (`moto`_) that
 will simulate AWS resources. You can use ``CB_TEST_PROVIDER=mock`` to run tests
 against the mock provider only, which will provide faster feedback times.
 
+Alternatively you can run the mock tests through tox.
+``tox -e "py27-mock"``
 
 .. _design goals: https://github.com/CloudVE/cloudbridge/
    blob/master/README.rst