Skip to content

Commit b3aa9f7

Browse files
misc: updated tests
1 parent a1ae7d5 commit b3aa9f7

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

tests/utest/test_base_locator_agent.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ def __init__(self) -> None:
131131
self.use_llm_for_locator_generation: bool = True
132132
self.locator_agent_provider: str = "prov"
133133
self.locator_agent_model: str = "mod"
134+
self.locator_agent_temperature: float = 0.1
135+
self.orchestrator_agent_temperature: float = 0.1
134136

135137
cfg_mod.Cfg = Cfg
136138
_force_module("SelfhealingAgents.utils", aid_utils)
@@ -332,6 +334,8 @@ class Cfg:
332334
use_llm_for_locator_generation: bool = use_llm
333335
locator_agent_provider: str = "prov"
334336
locator_agent_model: str = "mod"
337+
locator_agent_temperature: float = 0.1
338+
orchestrator_agent_temperature: float = 0.1
335339

336340
return Impl(Cfg(), dom)
337341

@@ -452,4 +456,4 @@ def test_sort_and_filter_helpers(mod_and_cls: Tuple[Any, Any, Any, Any]) -> None
452456
sorted_list = inst._sort_locators(["b", "a", "c"])
453457
assert sorted_list[:2] == ["a", "c"]
454458
filtered = inst._filter_clickable_locators(["a", "b", "c"])
455-
assert filtered == ["a", "c"]
459+
assert filtered == ["a", "c"]

tests/utest/test_orchestrator_agent.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ class FakeCfg:
247247
total_tokens_limit: int = 1000
248248
orchestrator_agent_provider: str = "prov"
249249
orchestrator_agent_model: str = "mod"
250+
orchestrator_agent_temperature: float = 0.1
250251

251252
orch = OrchestratorAgent(FakeCfg(), _FakeLocatorAgent(is_failed=False))
252253
payload = PromptPayload(
@@ -277,6 +278,7 @@ class FakeCfg:
277278
total_tokens_limit: int = 1000
278279
orchestrator_agent_provider: str = "prov"
279280
orchestrator_agent_model: str = "mod"
281+
orchestrator_agent_temperature: float = 0.1
280282

281283
orch = OrchestratorAgent(FakeCfg(), _FakeLocatorAgent(is_failed=True))
282284
payload = PromptPayload(
@@ -316,6 +318,7 @@ class FakeCfg:
316318
total_tokens_limit: int = 1000
317319
orchestrator_agent_provider: str = "prov"
318320
orchestrator_agent_model: str = "mod"
321+
orchestrator_agent_temperature: float = 0.1
319322

320323
orch = OrchestratorAgent(FakeCfg(), _FakeLocatorAgent(is_failed=True))
321324
payload = PromptPayload(
@@ -353,6 +356,7 @@ class FakeCfg:
353356
total_tokens_limit: int = 1000
354357
orchestrator_agent_provider: str = "prov"
355358
orchestrator_agent_model: str = "mod"
359+
orchestrator_agent_temperature: float = 0.1
356360

357361
orch = OrchestratorAgent(
358362
FakeCfg(),
@@ -373,6 +377,7 @@ class FakeCfg:
373377
total_tokens_limit: int = 1000
374378
orchestrator_agent_provider: str = "prov"
375379
orchestrator_agent_model: str = "mod"
380+
orchestrator_agent_temperature: float = 0.1
376381

377382
orch = OrchestratorAgent(
378383
FakeCfg(), _FakeLocatorAgent(is_failed=True, raise_on_heal=True)
@@ -390,4 +395,4 @@ def test_catch_token_limit_exceedance_logs(
390395
assert logger.infos == ["error: out of tokens"]
391396
logger.infos.clear()
392397
OrchestratorAgent._catch_token_limit_exceedance("ok")
393-
assert logger.infos == []
398+
assert logger.infos == []

0 commit comments

Comments
 (0)