@@ -117,7 +117,7 @@ def _make_stub(*args, **kwargs) -> tuple[StubEventLoggerService, list[FakeWriter
117117
118118@pytest .mark .unit
119119class TestWriteDispatch :
120- @pytest .mark .asyncio ( mode = "strict" )
120+ @pytest .mark .asyncio
121121 @pytest .mark .parametrize (
122122 "case_desc, records" ,
123123 [
@@ -146,14 +146,14 @@ async def test_records_written_to_all_writers(self, case_desc, records):
146146 for writer in writers :
147147 assert writer .written == records
148148
149- @pytest .mark .asyncio ( mode = "strict" )
149+ @pytest .mark .asyncio
150150 async def test_empty_batch (self ):
151151 service , writers = _make_stub ()
152152 await service .process ([])
153153 for writer in writers :
154154 assert len (writer .written ) == 0
155155
156- @pytest .mark .asyncio ( mode = "strict" )
156+ @pytest .mark .asyncio
157157 async def test_multiple_batches_accumulate (self ):
158158 service , writers = _make_stub ()
159159 await service .process ([_record (SampleEventType .ISSUED , uuid = "s1" )])
@@ -169,15 +169,15 @@ async def test_multiple_batches_accumulate(self):
169169
170170@pytest .mark .unit
171171class TestShutdownBehavior :
172- @pytest .mark .asyncio ( mode = "strict" )
172+ @pytest .mark .asyncio
173173 async def test_session_ended_triggers_flush_and_close (self ):
174174 service , writers = _make_stub ()
175175 await service .process ([_record (SessionEventType .ENDED , ts = 100 )])
176176 for writer in writers :
177177 assert writer .flush_count == 1
178178 assert writer .closed
179179
180- @pytest .mark .asyncio ( mode = "strict" )
180+ @pytest .mark .asyncio
181181 @pytest .mark .parametrize (
182182 "case_desc, trailing_record" ,
183183 [
@@ -202,13 +202,13 @@ async def test_events_after_ended_same_batch(self, case_desc, trailing_record):
202202 assert len (writer .written ) == 1
203203 assert writer .written [0 ].event_type == SessionEventType .ENDED
204204
205- @pytest .mark .asyncio ( mode = "strict" )
205+ @pytest .mark .asyncio
206206 async def test_writers_cleared_after_shutdown (self ):
207207 service , _ = _make_stub ()
208208 await service .process ([_record (SessionEventType .ENDED )])
209209 assert service .writers == []
210210
211- @pytest .mark .asyncio ( mode = "strict" )
211+ @pytest .mark .asyncio
212212 async def test_records_before_ended_are_written (self ):
213213 service , writers = _make_stub ()
214214 await service .process (
@@ -235,15 +235,15 @@ async def test_records_before_ended_are_written(self):
235235
236236@pytest .mark .unit
237237class TestClose :
238- @pytest .mark .asyncio ( mode = "strict" )
238+ @pytest .mark .asyncio
239239 async def test_close_closes_all_writers (self ):
240240 service , writers = _make_stub ()
241241 service .close ()
242242 for writer in writers :
243243 assert writer .closed
244244 assert service .writers == []
245245
246- @pytest .mark .asyncio ( mode = "strict" )
246+ @pytest .mark .asyncio
247247 async def test_close_idempotent (self ):
248248 service , _ = _make_stub ()
249249 service .close ()
@@ -257,7 +257,7 @@ async def test_close_idempotent(self):
257257
258258@pytest .mark .unit
259259class TestIntegrationWithRealWriters :
260- @pytest .mark .asyncio ( mode = "strict" )
260+ @pytest .mark .asyncio
261261 async def test_jsonl_writer_integration (self , tmp_path ):
262262 """EventLoggerService with a real JSONLWriter persists records to disk."""
263263 writer = JSONLWriter (tmp_path / "events" , flush_interval = 1 )
@@ -281,7 +281,7 @@ async def test_jsonl_writer_integration(self, tmp_path):
281281 assert records [1 ].event_type == SampleEventType .RECV_FIRST
282282 assert records [2 ].event_type == SampleEventType .COMPLETE
283283
284- @pytest .mark .asyncio ( mode = "strict" )
284+ @pytest .mark .asyncio
285285 async def test_sql_writer_integration (self , tmp_path ):
286286 """EventLoggerService with a real SQLWriter persists records to SQLite."""
287287 from sqlalchemy import create_engine , select
@@ -312,7 +312,7 @@ async def test_sql_writer_integration(self, tmp_path):
312312 ]
313313 engine .dispose ()
314314
315- @pytest .mark .asyncio ( mode = "strict" )
315+ @pytest .mark .asyncio
316316 async def test_dual_writer_integration (self , tmp_path ):
317317 """Both JSONL and SQL writers receive the same records."""
318318 jsonl_writer = JSONLWriter (tmp_path / "events" , flush_interval = 1 )
@@ -343,7 +343,7 @@ async def test_dual_writer_integration(self, tmp_path):
343343 assert rows [0 ].sample_uuid == "dual-1"
344344 engine .dispose ()
345345
346- @pytest .mark .asyncio ( mode = "strict" )
346+ @pytest .mark .asyncio
347347 async def test_ended_closes_real_writers (self , tmp_path ):
348348 """ENDED triggers close on real writers, flushing data to disk."""
349349 jsonl_writer = JSONLWriter (tmp_path / "events" , flush_interval = 100 )
@@ -361,7 +361,7 @@ async def test_ended_closes_real_writers(self, tmp_path):
361361 lines = [line for line in content .split ("\n " ) if line ]
362362 assert len (lines ) == 2
363363
364- @pytest .mark .asyncio ( mode = "strict" )
364+ @pytest .mark .asyncio
365365 async def test_events_after_ended_not_persisted_to_jsonl (self , tmp_path ):
366366 """All events after ENDED (including errors) are dropped from JSONL."""
367367 writer = JSONLWriter (tmp_path / "events" , flush_interval = 100 )
@@ -380,7 +380,7 @@ async def test_events_after_ended_not_persisted_to_jsonl(self, tmp_path):
380380 assert len (lines ) == 1
381381 assert "LateError" not in lines [0 ]
382382
383- @pytest .mark .asyncio ( mode = "strict" )
383+ @pytest .mark .asyncio
384384 async def test_full_lifecycle (self , tmp_path ):
385385 """Full session lifecycle: started -> samples -> ended."""
386386 writer = JSONLWriter (tmp_path / "events" , flush_interval = 1 )
@@ -418,7 +418,7 @@ async def test_full_lifecycle(self, tmp_path):
418418
419419@pytest .mark .unit
420420class TestEdgeCases :
421- @pytest .mark .asyncio ( mode = "strict" )
421+ @pytest .mark .asyncio
422422 @pytest .mark .parametrize (
423423 "case_desc, event_enum, make_record" ,
424424 [
@@ -439,7 +439,7 @@ async def test_all_event_types_written(self, case_desc, event_enum, make_record)
439439 for writer in writers :
440440 assert len (writer .written ) == len (list (event_enum ))
441441
442- @pytest .mark .asyncio ( mode = "strict" )
442+ @pytest .mark .asyncio
443443 async def test_ended_only_triggers_once (self ):
444444 """Multiple ENDED in a batch: shutdown path runs once, second ENDED is dropped."""
445445 service , writers = _make_stub ()
0 commit comments