From 749022da3643d1693876b33bd6bb410a0c1e9c51 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 5 Sep 2014 21:41:25 +0200 Subject: [PATCH] Issue #22340: Fix test_collections if the sets module was already imported --- Lib/test/test_collections.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/test/test_collections.py b/Lib/test/test_collections.py index 6c9c407025c..20e06673e32 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