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

Method test_keyword_arguments

Lib/test/test_descr.py:3759–3766  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3757 self.assertIsInstance(repr(Some()), str) # should not crash
3758
3759 def test_keyword_arguments(self):
3760 # Testing keyword arguments to __init__, __call__...
3761 def f(a): return a
3762 self.assertEqual(f.__call__(a=42), 42)
3763 ba = bytearray()
3764 bytearray.__init__(ba, 'abc\xbd\u20ac',
3765 encoding='latin1', errors='replace')
3766 self.assertEqual(ba, b'abc\xbd?')
3767
3768 @support.skip_wasi_stack_overflow()
3769 @support.skip_emscripten_stack_overflow()

Callers

nothing calls this directly

Calls 3

assertEqualMethod · 0.45
__call__Method · 0.45
__init__Method · 0.45

Tested by

no test coverage detected