From 95a97b7c0cd52fafb9defaa1737d432a0eb1c95f Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Tue, 21 Feb 2012 00:00:06 +0100 Subject: Delete the iterator, which could accidentally keep a temporary reference to the yielded element. --- Lib/test/test_weakset.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Lib/test/test_weakset.py b/Lib/test/test_weakset.py index 58a1f87..3cddf40 100644 --- a/Lib/test/test_weakset.py +++ b/Lib/test/test_weakset.py @@ -335,6 +335,7 @@ class TestWeakSet(unittest.TestCase): try: it = iter(s) next(it) + del it # Schedule an item for removal and recreate it u = ustr(str(items.pop())) gc.collect() # just in case -- cgit v0.12 From 178e5ea305848015d514f4038118777374e44c87 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Tue, 21 Feb 2012 00:32:36 +0100 Subject: Disable an inspect test: it depends on dict ordering which parameter is reported as duplicate. --- Lib/test/test_inspect.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/test/test_inspect.py b/Lib/test/test_inspect.py index f5318e1..4b7ee4e 100644 --- a/Lib/test/test_inspect.py +++ b/Lib/test/test_inspect.py @@ -810,7 +810,8 @@ class TestGetcallargsFunctions(unittest.TestCase): self.assertEqualException(f, '2, 3, 4') self.assertEqualException(f, '1, 2, 3, a=1') self.assertEqualException(f, '2, 3, 4, c=5') - self.assertEqualException(f, '2, 3, 4, a=1, c=5') + # XXX: success of this one depends on dict order + ## self.assertEqualException(f, '2, 3, 4, a=1, c=5') # f got an unexpected keyword argument self.assertEqualException(f, 'c=2') self.assertEqualException(f, '2, c=3') -- cgit v0.12