Преглед изворни кода

catch_warnings no longer in celery.tests.utils

Ask Solem пре 13 година
родитељ
комит
e5bee42cda
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      celery/tests/__init__.py

+ 2 - 2
celery/tests/__init__.py

@@ -79,7 +79,7 @@ def import_all_modules(name=__name__, file=__file__,
 
 
 if os.environ.get('COVER_ALL_MODULES') or '--with-coverage3' in sys.argv:
-    from celery.tests.utils import catch_warnings
-    with catch_warnings(record=True):
+    import warnings
+    with warnings.catch_warnings(record=True):
         import_all_modules()
     warnings.resetwarnings()