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

Method test_arg_errors

Lib/test/test_trace.py:288–294  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

286 self.assertEqual(self.tracer.results().calledfuncs, expected)
287
288 def test_arg_errors(self):
289 res = self.tracer.runfunc(traced_capturer, 1, 2, self=3, func=4)
290 self.assertEqual(res, ((1, 2), {'self': 3, 'func': 4}))
291 with self.assertRaises(TypeError):
292 self.tracer.runfunc(func=traced_capturer, arg=1)
293 with self.assertRaises(TypeError):
294 self.tracer.runfunc()
295
296 def test_loop_caller_importing(self):
297 self.tracer.runfunc(traced_func_importing_caller, 1)

Callers

nothing calls this directly

Calls 3

runfuncMethod · 0.80
assertEqualMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected