This is an automated email from the ASF dual-hosted git repository. skrawcz pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/burr.git
commit 5a38e015a7cf44a66a31a826cd21ebc219783f60 Author: goutamk09 <[email protected]> AuthorDate: Mon Jan 19 20:18:53 2026 +0530 Add unit test for override_state_values in initialize_from --- tests/core/test_application.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/tests/core/test_application.py b/tests/core/test_application.py index 7e0073dc..be669f67 100644 --- a/tests/core/test_application.py +++ b/tests/core/test_application.py @@ -3725,3 +3725,29 @@ def test_application__process_control_flow_params(): assert sorted(halt_after) == ["test_action", "test_action_2"] assert halt_before == ["test_action"] assert inputs == {} + +def test_initialize_from_applies_override_state_values(): + from burr.core.application import ApplicationBuilder + from burr.core.state import State + from burr.core.persistence import BaseStateLoader + + class FakeStateLoader(BaseStateLoader): + def load(self, partition_key, app_id, sequence_id): + return { + "state": State({"x": 1}), + "position": None, + "sequence_id": 0, + "status": "completed", + } + + builder = ApplicationBuilder().initialize_from( + initializer=FakeStateLoader(), + resume_at_next_action=False, + default_state={}, + default_entrypoint="_start", + override_state_values={"x": 100}, + ) + + app = builder.build() + + assert app.state["x"] == 100
