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

Method test_replace_non_str_kwarg

Lib/test/test_ast/test_ast.py:1446–1450  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1444 self.assertRaises(AttributeError, getattr, node, 'unknown')
1445
1446 def test_replace_non_str_kwarg(self):
1447 node = ast.Name(id="x")
1448 errmsg = "got an unexpected keyword argument <object object"
1449 with self.assertRaisesRegex(TypeError, errmsg):
1450 node.__replace__(**{object(): "y"})
1451
1452
1453class ASTHelpers_Test(unittest.TestCase):

Callers

nothing calls this directly

Calls 2

assertRaisesRegexMethod · 0.80
__replace__Method · 0.45

Tested by

no test coverage detected