test: add comprehensive unit, integration, and e2e test suites
Introduce complete test coverage for the ARTEMIS platform across multiple layers: Unit tests: Add tests for agent nodes (Planner, Operator, Validator, Diagnoser, FlashRunner, Explorer), tools, utils (OCR/XML fusion, UI hierarchy), and data engine. Integration tests: Add live tool verification, reactive runner, IME, and standalone workflow tests. E2E tests: Add end-to-end scenario tests for media playback and failure recovery flows. Fixtures & mocks: Add mock inputs (audio, video, screenshot) and test utilities.
This commit is contained in:
1 parent
c1803fcb86
commit
5d2283deaa
115 files changed
+22813
No files matched your search
@@ -0,0 +1,30 @@
|
||||
import asyncio
|
||||
import pytest
|
||||
from artemis.context import ArtemisContext, DeviceContext, DevicePlatform
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_artemis_context_waits_for_background_tasks():
|
||||
device = DeviceContext(
|
||||
host_platform="LINUX",
|
||||
mobile_platform=DevicePlatform.ANDROID,
|
||||
device_id="dummy",
|
||||
device_width=1080,
|
||||
device_height=2400,
|
||||
)
|
||||
|
||||
context = ArtemisContext(device=device)
|
||||
|
||||
task_run = False
|
||||
|
||||
async def dummy_task():
|
||||
nonlocal task_run
|
||||
await asyncio.sleep(0.1)
|
||||
task_run = True
|
||||
|
||||
async with context:
|
||||
task = asyncio.create_task(dummy_task())
|
||||
context.background_tasks.append(task)
|
||||
|
||||
# After exiting the context, the task should have run to completion
|
||||
assert task_run is True
|
||||
Reference in new issue
Block a user