浏览代码

catch_warnings no longer in celery.tests.utils

Ask Solem 12 年之前
父节点
当前提交
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()