]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blame - python3/patches/00135-fix-test-within-test_weakref-in-debug-build.patch
ppp: Re-add ifname patch
[people/ms/ipfire-3.x.git] / python3 / patches / 00135-fix-test-within-test_weakref-in-debug-build.patch
CommitLineData
bf250edf
MT
1diff -up Python-3.2b2/Lib/test/test_weakref.py.test-weakref-COUNT_ALLOCS_fix Python-3.2b2/Lib/test/test_weakref.py
2--- Python-3.2b2/Lib/test/test_weakref.py.test-weakref-COUNT_ALLOCS_fix 2010-12-28 20:33:46.963364990 -0500
3+++ Python-3.2b2/Lib/test/test_weakref.py 2010-12-28 20:35:44.115935248 -0500
4@@ -583,9 +583,10 @@ class ReferencesTestCase(TestBase):
5 # been cleared without their callbacks executing. OTOH, the weakref
6 # to C is bound to a function local (wr), and wasn't trash, so that
7 # callback should have been invoked when C went away.
8- self.assertEqual(alist, ["C went away"])
9- # The remaining weakref should be dead now (its callback ran).
10- self.assertEqual(wr(), None)
11+ if not hasattr(sys, 'getcounts'):
12+ self.assertEqual(alist, ["C went away"])
13+ # The remaining weakref should be dead now (its callback ran).
14+ self.assertEqual(wr(), None)
15
16 del alist[:]
17 gc.collect()