python3.6/python-3.2b2-test-weakref-COUNT_ALLOCS_fix.patch
David Malcolm 5080ffc5d3 * Tue Dec 28 2010 David Malcolm <dmalcolm@redhat.com> - 3.2-0.5.b2
- 3.2b2
- rework patch 3 (removal of mimeaudio tests), patch 6 (no static libs),
patch 8 (systemtap), patch 102 (lib64)
- remove patch 4 (rendered redundant by upstream r85537), patch 103 (PEP 3149),
patch 110 (upstreamed expat fix), patch 111 (parallel build fix for grammar
fixed upstream)
- regenerate patch 300 (autotool intermediates)
- workaround COUNT_ALLOCS weakref issues in test suite (patch 126, patch 127,
patch 128)
- stop using runtest.sh in %%check (dropped by upstream), replacing with
regrtest; fixup list of failing tests
- introduce "pyshortver", "SOABI_optimized" and "SOABI_debug" macros
- rework manifests of shared libraries to use "SOABI_" macros, reflecting
PEP 3149
- drop itertools, operator and _collections modules from the manifests as py3k
commit r84058 moved these inside libpython; json/tests moved to test/json_tests
- move turtle code into the tkinter subpackage
2010-12-29 13:26:29 -05:00

18 lines
997 B
Diff

diff -up Python-3.2b2/Lib/test/test_weakref.py.test-weakref-COUNT_ALLOCS_fix Python-3.2b2/Lib/test/test_weakref.py
--- Python-3.2b2/Lib/test/test_weakref.py.test-weakref-COUNT_ALLOCS_fix 2010-12-28 20:33:46.963364990 -0500
+++ Python-3.2b2/Lib/test/test_weakref.py 2010-12-28 20:35:44.115935248 -0500
@@ -583,9 +583,10 @@ class ReferencesTestCase(TestBase):
# been cleared without their callbacks executing. OTOH, the weakref
# to C is bound to a function local (wr), and wasn't trash, so that
# callback should have been invoked when C went away.
- self.assertEqual(alist, ["C went away"])
- # The remaining weakref should be dead now (its callback ran).
- self.assertEqual(wr(), None)
+ if not hasattr(sys, 'getcounts'):
+ self.assertEqual(alist, ["C went away"])
+ # The remaining weakref should be dead now (its callback ran).
+ self.assertEqual(wr(), None)
del alist[:]
gc.collect()