From c438d1d021e7275ae5d41b402df885588a73463c Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Tue, 3 Aug 2010 08:54:36 +0000 Subject: Fix deprecation warnings in test_sets.py --- Lib/test/test_sets.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Lib/test/test_sets.py b/Lib/test/test_sets.py index 53c30be..9905d13 100644 --- a/Lib/test/test_sets.py +++ b/Lib/test/test_sets.py @@ -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]) -- cgit v0.12