@@ -99,37 +99,6 @@ def test_build_edges_with_stub_edge(runner: SimulationRunner) -> None:
9999 assert len (runner ._edges_runtime ) == 1 # noqa: SLF001
100100
101101
102- # --------------------------------------------------------------------------- #
103- # End-to-end “mini” run #
104- # --------------------------------------------------------------------------- #
105- def test_run_returns_results_analyzer (runner : SimulationRunner ) -> None :
106- """
107- `.run()` must complete even though the client is a sink node. We patch
108- `_build_client` to assign a no-op edge to avoid assertions.
109- """
110-
111- class _NoOpEdge :
112- """Edge stub that silently discards transported states."""
113-
114- def transport (self ) -> None :
115- return
116-
117- def patched_build_client (self : SimulationRunner ) -> None :
118- # Call the original builder
119- SimulationRunner ._build_client (self ) # noqa: SLF001
120- cli_rt = next (iter (self ._client_runtime .values ()))
121- cli_rt .out_edge = _NoOpEdge () # type: ignore[assignment]
122-
123- with patch .object (runner , "_build_client" , patched_build_client .__get__ (runner )):
124- results : ResultsAnalyzer = runner .run ()
125-
126- assert isinstance (results , ResultsAnalyzer )
127- assert (
128- pytest .approx (runner .env .now )
129- == runner .simulation_settings .total_simulation_time
130- )
131-
132-
133102# --------------------------------------------------------------------------- #
134103# from_yaml utility #
135104# --------------------------------------------------------------------------- #
0 commit comments