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