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

Function reset_options

src/py/reactpy/tests/test_config.py:8–23  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6
7@pytest.fixture(autouse=True)
8def reset_options():
9 options = [value for value in config.__dict__.values() if isinstance(value, Option)]
10
11 should_unset = object()
12 original_values = []
13 for opt in options:
14 original_values.append(opt.current if opt.is_set() else should_unset)
15
16 yield
17
18 for opt, val in zip(options, original_values):
19 if val is should_unset:
20 if opt.is_set():
21 opt.unset()
22 else:
23 opt.current = val
24
25
26def test_reactpy_debug_mode_toggle():

Callers

nothing calls this directly

Calls 2

is_setMethod · 0.80
unsetMethod · 0.80

Tested by

no test coverage detected