Index: Lib/test/test_weakref.py =================================================================== --- Lib/test/test_weakref.py (révision 66336) +++ Lib/test/test_weakref.py (copie de travail) @@ -665,7 +665,19 @@ w = Target() + def test_init(self): + # Issue 3634 + # .__init__() doesn't check errors correctly + r = weakref.ref(Exception) + try: + r.__init__(0, 0, 0, 0, 0) + except TypeError: + # Ok! + pass + # No exception should be raised here + gc.collect() + class SubclassableWeakrefTestCase(TestBase): def test_subclass_refs(self):