소스 검색

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()