MCPcopy
hub / github.com/python-attrs/attrs / test_can_change_inst

Method test_can_change_inst

tests/test_funcs.py:836–846  ·  view source on GitHub ↗

If the instance is passed by positional argument, a field named `inst` can be changed.

(self)

Source from the content-addressed store, hash-verified

834 evolve(1, 2)
835
836 def test_can_change_inst(self):
837 """
838 If the instance is passed by positional argument, a field named `inst`
839 can be changed.
840 """
841
842 @attr.define
843 class C:
844 inst: int
845
846 assert C(42) == evolve(C(23), inst=42)

Callers

nothing calls this directly

Calls 2

evolveFunction · 0.90
CClass · 0.70

Tested by

no test coverage detected