Explorar o código

Tests: import_all_modules now ignores OSError

Ask Solem %!s(int64=9) %!d(string=hai) anos
pai
achega
990a04615a
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      celery/tests/__init__.py

+ 5 - 0
celery/tests/__init__.py

@@ -90,3 +90,8 @@ def import_all_modules(name=__name__, file=__file__,
                 import_module(module)
             except ImportError:
                 pass
+            except OSError as exc:
+                warnings.warn(UserWarning(
+                    'Ignored error importing module {0}: {1!r}').format(
+                        module, exc,
+                    ))