]> granicus.if.org Git - python/commitdiff
Remove unused function in `testmock/support.py` (GH-10975)
authorMario Corchero <mariocj89@gmail.com>
Thu, 6 Dec 2018 17:05:46 +0000 (17:05 +0000)
committerPablo Galindo <Pablogsal@gmail.com>
Thu, 6 Dec 2018 17:05:46 +0000 (17:05 +0000)
The function is never imported and the implementation is actually buggy.
As `warnings.catch_warnings` is not imported here.

Lib/unittest/test/testmock/support.py

index 205431adcacc8919e0b01f9544d22034a1296064..c7ad20b80665f2f66737ac803903f0e572ebae09 100644 (file)
@@ -12,10 +12,3 @@ class SomeClass(object):
 
 class X(object):
     pass
-
-
-def examine_warnings(func):
-    def wrapper():
-        with catch_warnings(record=True) as ws:
-            func(ws)
-    return wrapper