]> granicus.if.org Git - python/commitdiff
Issue #22340: Fix test_collections if the sets module was already imported
authorVictor Stinner <victor.stinner@gmail.com>
Fri, 5 Sep 2014 19:41:25 +0000 (21:41 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Fri, 5 Sep 2014 19:41:25 +0000 (21:41 +0200)
Lib/test/test_collections.py

index 6c9c407025c98fcd91a33932d0b2c87895d587dd..20e06673e322b9e7e0ee1b882bbfb70505c72f3e 100644 (file)
@@ -14,8 +14,8 @@ from collections import Sized, Container, Callable
 from collections import Set, MutableSet
 from collections import Mapping, MutableMapping
 from collections import Sequence, MutableSequence
-with test_support.check_warnings(('', DeprecationWarning)):
-    import sets
+# Silence deprecation warning
+sets = test_support.import_module('sets', deprecated=True)
 
 TestNT = namedtuple('TestNT', 'x y z')    # type used for pickle tests