MCPcopy Index your code
hub / github.com/reactive-python/reactpy / test_immutable_option

Function test_immutable_option

src/py/reactpy/tests/test__option.py:40–46  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

38
39
40def test_immutable_option():
41 opt = Option("A_FAKE_OPTION", "default-value", mutable=False)
42 assert not opt.mutable
43 with pytest.raises(TypeError, match="cannot be modified after initial load"):
44 opt.current = "a-new-value"
45 with pytest.raises(TypeError, match="cannot be modified after initial load"):
46 opt.unset()
47
48
49def test_option_reset():

Callers

nothing calls this directly

Calls 2

unsetMethod · 0.95
OptionClass · 0.90

Tested by

no test coverage detected