MCPcopy
hub / github.com/marimo-team/marimo / assert_only_one_called

Function assert_only_one_called

tests/_sql/test_engine_utils.py:35–43  ·  view source on GitHub ↗

Assert that only the specified mock function was called.

(
    mock_functions: MockFnDict, function_name: MockFunctions
)

Source from the content-addressed store, hash-verified

33
34
35def assert_only_one_called(
36 mock_functions: MockFnDict, function_name: MockFunctions
37) -> None:
38 """Assert that only the specified mock function was called."""
39 for name, mock_fn in mock_functions.items():
40 if name == function_name:
41 mock_fn.assert_called_once()
42 else:
43 mock_fn.assert_not_called()
44
45
46def assert_multiple_called_once(

Calls 1

itemsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…