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,15 @@ w = Target() + def test_init(self): + # Issue 3634 + # .__init__() doesn't check errors correctly + r = weakref.ref(Exception) + self.assertRaises(TypeError, r.__init__, 0, 0, 0, 0, 0) + # No exception should be raised here + gc.collect() + class SubclassableWeakrefTestCase(TestBase): def test_subclass_refs(self):