From: Victor Stinner Date: Fri, 5 Sep 2014 19:41:25 +0000 (+0200) Subject: Issue #22340: Fix test_collections if the sets module was already imported X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=749022da3643d1693876b33bd6bb410a0c1e9c51;p=python Issue #22340: Fix test_collections if the sets module was already imported --- diff --git a/Lib/test/test_collections.py b/Lib/test/test_collections.py index 6c9c407025..20e06673e3 100644 --- a/Lib/test/test_collections.py +++ b/Lib/test/test_collections.py @@ -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