From cd857e1ca4860bfc9611a320c7dfd24c5e988733 Mon Sep 17 00:00:00 2001 From: rayhpeng Date: Wed, 29 Jul 2026 22:40:14 +0800 Subject: [PATCH] test(schedule): silence the sync-under-asyncio-mark warnings The two command-shape tests added with the command refactor are plain functions in a module whose global pytestmark is asyncio, which pytest reports as a warning per run. Making them coroutines matches the module convention. --- backend/tests/test_schedule_service.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/tests/test_schedule_service.py b/backend/tests/test_schedule_service.py index e6344a94f..1890b0d97 100644 --- a/backend/tests/test_schedule_service.py +++ b/backend/tests/test_schedule_service.py @@ -739,7 +739,7 @@ class TestTaskManagement: ) assert await service.list_tasks("user-1") == [] - def test_commands_are_dumb_data(self): + async def test_commands_are_dumb_data(self): # A command carries intent without validating it: business rules stay # on the aggregate, so error attribution (a malformed schedule before # an unknown thread) is owned by the handler's construction order, @@ -747,7 +747,7 @@ class TestTaskManagement: cmd = CreateScheduledTask(user_id="u", title="", prompt="", schedule=CRON, context_mode="not-a-mode", thread_id=None) assert cmd.context_mode == "not-a-mode" - def test_unset_is_a_singleton_distinct_from_none(self): + async def test_unset_is_a_singleton_distinct_from_none(self): # Three states, not two: an update field is UNSET (leave it alone), # None can stay a meaningful value elsewhere, and UNSET is falsy so # it cannot masquerade as a supplied value.