MCPcopy Index your code
hub / github.com/plotly/dash / _reset_mcp_module_state

Function _reset_mcp_module_state

tests/unit/mcp/test_mcp_configure.py:45–57  ·  view source on GitHub ↗

Restore module-level MCP state after every test.

()

Source from the content-addressed store, hash-verified

43
44@pytest.fixture(autouse=True)
45def _reset_mcp_module_state():
46 """Restore module-level MCP state after every test."""
47 yield
48
49 from dash.mcp import _configure
50
51 CallbackTools.callbacks_mcp_enabled_by_default = True
52 CallbackTools.expose_docstrings_by_default = False
53 _RESOURCE_PROVIDERS[:] = list(_DEFAULT_RESOURCE_PROVIDERS)
54 _TOOL_PROVIDERS[:] = list(_DEFAULT_TOOL_PROVIDERS)
55 _configure._current_config = dict(_configure._DEFAULT_CONFIG)
56 _get_app_module.APP = None
57 _get_app_module.app_context.set(None)
58
59
60def _make_app(**cb_kwargs):

Callers

nothing calls this directly

Calls 1

setMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…