From 21eb48764c618eede0405ef840eadf1b03ff9b00 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sat, 7 May 2016 15:41:09 +0300 Subject: Issue #17765: weakref.ref() no longer silently ignores keyword arguments. Patch by Georg Brandl. --- Lib/test/test_weakref.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Lib/test/test_weakref.py') diff --git a/Lib/test/test_weakref.py b/Lib/test/test_weakref.py index f37f1e9e245..f49cb7e591f 100644 --- a/Lib/test/test_weakref.py +++ b/Lib/test/test_weakref.py @@ -133,6 +133,10 @@ class ReferencesTestCase(TestBase): ref1 = weakref.ref(c, callback) del c + def test_constructor_kwargs(self): + c = C() + self.assertRaises(TypeError, weakref.ref, c, callback=None) + def test_proxy_ref(self): o = C() o.bar = 1 -- cgit v1.2.3