mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-21 04:39:06 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user