@@ -55,8 +55,9 @@ async def test_cache_invalidation_on_save(tmp_path: Path):
5555 # Load summary again - should get fresh data, not cached stale data
5656 summary = await storage .load_summary (run_id )
5757 assert summary is not None
58- assert summary .status == RunStatus .COMPLETED , \
58+ assert summary .status == RunStatus .COMPLETED , (
5959 "Summary cache should be invalidated on save - got stale data"
60+ )
6061 finally :
6162 await storage .stop ()
6263
@@ -81,15 +82,15 @@ async def test_batched_write_cache_consistency(tmp_path: Path):
8182 # Before batch flush, cache should NOT contain the run
8283 # (This is the fix - previously cache was updated immediately)
8384 cache_key = f"run:{ run_id } "
84- assert cache_key not in storage ._cache , \
85+ assert cache_key not in storage ._cache , (
8586 "Cache should not be updated before batch is flushed"
87+ )
8688
8789 # Wait for batch to flush
8890 await asyncio .sleep (0.1 )
8991
9092 # After batch flush, cache should contain the run
91- assert cache_key in storage ._cache , \
92- "Cache should be updated after batch flush"
93+ assert cache_key in storage ._cache , "Cache should be updated after batch flush"
9394
9495 # Verify data on disk matches cache
9596 loaded_run = await storage .load_run (run_id , use_cache = False )
@@ -115,8 +116,7 @@ async def test_immediate_write_updates_cache(tmp_path: Path):
115116
116117 # Cache should be updated immediately for immediate writes
117118 cache_key = f"run:{ run_id } "
118- assert cache_key in storage ._cache , \
119- "Cache should be updated after immediate write"
119+ assert cache_key in storage ._cache , "Cache should be updated after immediate write"
120120
121121 # Verify cached value is correct
122122 cached_run = storage ._cache [cache_key ].value
0 commit comments