MCPcopy Index your code
hub / github.com/python/cpython / test_weak_keyed_dict_update

Method test_weak_keyed_dict_update

Lib/test/test_weakref.py:1815–1822  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1813 self.assertNotIn(1, tmp4)
1814
1815 def test_weak_keyed_dict_update(self):
1816 self.check_update(weakref.WeakKeyDictionary,
1817 {C(): 1, C(): 2, C(): 3})
1818 d = weakref.WeakKeyDictionary()
1819 msg = ("Keyword arguments are not supported: "
1820 "cannot create weak reference to 'str' object")
1821 with self.assertRaisesRegex(TypeError, msg):
1822 d.update(k='v')
1823
1824 def test_weak_keyed_delitem(self):
1825 d = weakref.WeakKeyDictionary()

Callers

nothing calls this directly

Calls 4

check_updateMethod · 0.95
updateMethod · 0.95
assertRaisesRegexMethod · 0.80
CClass · 0.70

Tested by

no test coverage detected