diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-05-07 12:43:59 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-05-07 12:43:59 (GMT) |
commit | 17e22959a444ee44c9462f3b66610950a8bc5a2b (patch) | |
tree | e6a3629e83b4c84422f0df8181f5e83d9aea37f3 /Lib/test | |
parent | 1acbf853c8be743c88141501ae879d63eb8ce209 (diff) | |
parent | 21eb48764c618eede0405ef840eadf1b03ff9b00 (diff) | |
download | cpython-17e22959a444ee44c9462f3b66610950a8bc5a2b.zip cpython-17e22959a444ee44c9462f3b66610950a8bc5a2b.tar.gz cpython-17e22959a444ee44c9462f3b66610950a8bc5a2b.tar.bz2 |
Issue #17765: weakref.ref() no longer silently ignores keyword arguments.
Patch by Georg Brandl.
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_weakref.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_weakref.py b/Lib/test/test_weakref.py index f37f1e9..f49cb7e 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 |