]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Remove debug code from weakref_segfault().
authorGuido van Rossum <guido@python.org>
Thu, 29 May 2003 14:31:42 +0000 (14:31 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 29 May 2003 14:31:42 +0000 (14:31 +0000)
Also move the call of the test to the top; the crash is caused by a
double free.

Lib/test/test_descr.py

index bf37681539293d172c49952d824b35cc43b201ac..0b7d69b594d58022a8d6c198549c93794a218616 100644 (file)
@@ -3157,8 +3157,6 @@ def weakref_segfault():
 
         def __del__(self):
             x = self.ref()
-            print x
-            return x
 
     class Oops(object):
         pass
@@ -3169,6 +3167,7 @@ def weakref_segfault():
 
 
 def test_main():
+    weakref_segfault() # Must be first, somehow
     class_docstrings()
     lists()
     dicts()
@@ -3232,7 +3231,6 @@ def test_main():
     funnynew()
     subclass_right_op()
     dict_type_with_metaclass()
-    weakref_segfault()
 
     if verbose: print "All OK"