mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
Issue #17765: weakref.ref() no longer silently ignores keyword arguments.
Patch by Georg Brandl.
This commit is contained in:
parent
6dff0205b7
commit
21eb48764c
3 changed files with 10 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue