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

Method test_replace_frozen

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

Source from the content-addressed store, hash-verified

2319 assert replace(p, x=3) == Point(3, 2)
2320
2321 def test_replace_frozen(self, replace):
2322 class Test(msgspec.Struct, frozen=True):
2323 x: int
2324 y: int
2325
2326 assert replace(Test(1, 2), x=3) == Test(3, 2)
2327
2328 def test_replace_gc_delayed_tracking(self, replace):
2329 class Test(msgspec.Struct):

Callers

nothing calls this directly

Calls 2

replaceFunction · 0.85
TestClass · 0.70

Tested by

no test coverage detected