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

Method test_argument_checking

Lib/test/test_functools.py:94–101  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

92 self.assertEqual(p.keywords, dict(a=10, b=20))
93
94 def test_argument_checking(self):
95 self.assertRaises(TypeError, self.partial) # need at least a func arg
96 try:
97 self.partial(2)()
98 except TypeError:
99 pass
100 else:
101 self.fail('First arg not checked for callability')
102
103 def test_protection_of_callers_dict_argument(self):
104 # a caller's dictionary should not be altered by partial

Callers

nothing calls this directly

Calls 3

partialMethod · 0.80
assertRaisesMethod · 0.45
failMethod · 0.45

Tested by

no test coverage detected