Commits

Barry Warsaw  committed dbce556

crash_in_get_sf736892(): A test of SF 736892, forcing function to act
like an unbound method dumps core.

  • Participants
  • Parent commits b1792a6
  • Branches 2.2

Comments (0)

Files changed (1)

File Lib/test/test_descr.py

     del o
 
 
+def crash_in_get_sf736892():
+    def func():
+        pass
+
+    try:
+        f = func.__get__(None)
+    except TypeError:
+        pass
+    else:
+        # should not get here
+        f(1) # crash
+
+
 def test_main():
     weakref_segfault() # Must be first, somehow
     class_docstrings()
     funnynew()
     subclass_right_op()
     dict_type_with_metaclass()
+    crash_in_get_sf736892()
 
     if verbose: print "All OK"