MCPcopy Index your code
hub / github.com/msgspec/msgspec / test_replace_kwargs

Method test_replace_kwargs

tests/unit/test_struct.py:2298–2302  ·  view source on GitHub ↗
(self, replace)

Source from the content-addressed store, hash-verified

2296 assert replace(p) == p
2297
2298 def test_replace_kwargs(self, replace):
2299 p = Point(1, 2)
2300 assert replace(p, x=3) == Point(3, 2)
2301 assert replace(p, y=4) == Point(1, 4)
2302 assert replace(p, x=3, y=4) == Point(3, 4)
2303
2304 def test_replace_unknown_field(self, replace):
2305 p = Point(1, 2)

Callers

nothing calls this directly

Calls 2

replaceFunction · 0.85
PointClass · 0.70

Tested by

no test coverage detected