From 2cb3a83796ff6316644f8d8cb748c235a6069d1c Mon Sep 17 00:00:00 2001 From: Pigbibi <20649888+Pigbibi@users.noreply.github.com> Date: Thu, 1 Oct 2026 02:25:31 +0800 Subject: [PATCH] test: isolate durable composer package metadata lookup Co-Authored-By: Codex --- tests/test_runtime_composer.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tests/test_runtime_composer.py b/tests/test_runtime_composer.py index 07b2c02..fcedc52 100644 --- a/tests/test_runtime_composer.py +++ b/tests/test_runtime_composer.py @@ -346,7 +346,20 @@ def test_live_target_validation_override_suppresses_live_commands_for_probe_and_ assert config.durable_live_execution_session_authorized is False -def test_live_target_without_override_keeps_durable_execution_conditions(): +def test_live_target_without_override_keeps_durable_execution_conditions(monkeypatch): + source_metadata = { + "quant_platform_kit.egg-info", + "us_equity_strategies.egg-info", + } + monkeypatch.setattr( + sys, + "path", + [ + entry + for entry in sys.path + if not any((Path(entry) / name).exists() for name in source_metadata) + ], + ) composer, legacy_order_status, notification_calls = _build_live_command_test_composer( dry_run_only=False, )