summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-05-07 12:41:09 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-05-07 12:41:09 (GMT)
commit816a5ff3b218ac374f89bf3cda0d13f47b7bd92e (patch)
tree4c97c70fda3f69c42196da80fd7dcea299c65e0b /Lib
parentb4905efe23c3e158a3c494d40988ce6de6bde3cd (diff)
downloadcpython-816a5ff3b218ac374f89bf3cda0d13f47b7bd92e.zip
cpython-816a5ff3b218ac374f89bf3cda0d13f47b7bd92e.tar.gz
cpython-816a5ff3b218ac374f89bf3cda0d13f47b7bd92e.tar.bz2
Issue #17765: weakref.ref() no longer silently ignores keyword arguments.
Patch by Georg Brandl.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_weakref.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_weakref.py b/Lib/test/test_weakref.py
index b7f985c..4073d49 100644
--- a/Lib/test/test_weakref.py
+++ b/Lib/test/test_weakref.py
@@ -116,6 +116,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