@@ -251,11 +251,12 @@ async def fill():
251251
252252# The relevant internal methods do not exist on _LRUCacheWrapperInstanceMethod,
253253# so we can skip methods for this part of the benchmark suite.
254- only_funcs = all_funcs [:2 ] + all_funcs [4 :5 ]
255- func_ids = ids [:2 ] + ids [4 :5 ]
254+ # We also skip wrappers with ttl because it raises KeyError.
255+ only_funcs_no_ttl = all_funcs [:2 ]
256+ func_ids_no_ttl = ids [:2 ]
256257
257258
258- @pytest .mark .parametrize ("func" , only_funcs , ids = func_ids )
259+ @pytest .mark .parametrize ("func" , only_funcs_no_ttl , ids = func_ids_no_ttl )
259260def test_internal_cache_hit_microbenchmark (
260261 benchmark : BenchmarkFixture ,
261262 run_loop : Callable [..., Any ],
@@ -275,7 +276,7 @@ def run() -> None:
275276 cache_hit (i )
276277
277278
278- @pytest .mark .parametrize ("func" , only_funcs , ids = func_ids )
279+ @pytest .mark .parametrize ("func" , only_funcs_no_ttl , ids = func_ids_no_ttl )
279280def test_internal_cache_miss_microbenchmark (
280281 benchmark : BenchmarkFixture , func : _LRUCacheWrapper [Any ]
281282) -> None :
@@ -288,7 +289,7 @@ def run() -> None:
288289 cache_miss (i )
289290
290291
291- @pytest .mark .parametrize ("func" , only_funcs , ids = func_ids )
292+ @pytest .mark .parametrize ("func" , only_funcs_no_ttl , ids = func_ids_no_ttl_no_ttl )
292293@pytest .mark .parametrize ("task_state" , ["finished" , "cancelled" , "exception" ])
293294def test_internal_task_done_callback_microbenchmark (
294295 benchmark : BenchmarkFixture ,
0 commit comments