]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix deprecation warnings in test_sets.py
authorEzio Melotti <ezio.melotti@gmail.com>
Tue, 3 Aug 2010 08:54:36 +0000 (08:54 +0000)
committerEzio Melotti <ezio.melotti@gmail.com>
Tue, 3 Aug 2010 08:54:36 +0000 (08:54 +0000)
Lib/test/test_sets.py

index 53c30beab9445a08ad045903acfcabe59c599d1f..9905d1349c7c3709cb2d3c332f6f90fddc2376d7 100644 (file)
@@ -691,8 +691,9 @@ class TestCopying(unittest.TestCase):
     def test_deep_copy(self):
         dup = copy.deepcopy(self.set)
         ##print type(dup), repr(dup)
-        dup_list = list(dup); dup_list.sort()
-        set_list = list(self.set); set_list.sort()
+        with test_support.check_warnings():
+            dup_list = sorted(dup)
+            set_list = sorted(self.set)
         self.assertEqual(len(dup_list), len(set_list))
         for i in range(len(dup_list)):
             self.assertEqual(dup_list[i], set_list[i])