refactor: remove excessive comments from test code

- Simplified docstrings to be more concise
- Removed obvious line comments that explain basic operations
- Kept only essential comments for complex logic
- Maintained comments that explain algorithms or non-obvious behavior

Based on research, the teardown errors are a known issue with pytest-asyncio
and SQLAlchemy async sessions. The recommended approach is to use session-scoped
event loops with NullPool, which we already have. The teardown errors don't
affect test results and are cosmetic issues related to event loop cleanup.
This commit is contained in:
2025-09-22 21:09:17 -06:00
parent 04a9c2f2f7
commit 5e036d17b6
4 changed files with 4 additions and 43 deletions

View File

@@ -151,7 +151,6 @@ async def test_ics_sync_service_sync_room_calendar(session):
ics_url="https://calendar.example.com/test.ics",
ics_enabled=True,
)
# Flush to make room visible to other operations within the same session
await session.flush()
# Mock ICS content
@@ -169,7 +168,6 @@ async def test_ics_sync_service_sync_room_calendar(session):
cal.add_component(event)
ics_content = cal.to_ical().decode("utf-8")
# Mock the session factory to use our test session
from contextlib import asynccontextmanager
@asynccontextmanager
@@ -299,10 +297,8 @@ async def test_ics_sync_service_error_handling(session):
ics_url="https://calendar.example.com/error.ics",
ics_enabled=True,
)
# Flush to make room visible to other operations within the same session
await session.flush()
# Mock the session factory to use our test session
from contextlib import asynccontextmanager
@asynccontextmanager