File tree 1 file changed +46
-0
lines changed
1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change @@ -552,3 +552,49 @@ def test_copy_from_existing_cimultidict(
552
552
@benchmark
553
553
def _run () -> None :
554
554
existing .copy ()
555
+
556
+
557
+ def test_iterate_multidict (
558
+ benchmark : BenchmarkFixture , any_multidict_class : Type [MultiDict [str ]]
559
+ ) -> None :
560
+ items = [(str (i ), str (i )) for i in range (100 )]
561
+ md = any_multidict_class (items )
562
+
563
+ @benchmark
564
+ def _run () -> None :
565
+ for _ in md :
566
+ pass
567
+
568
+ def test_iterate_multidict_keys (
569
+ benchmark : BenchmarkFixture , any_multidict_class : Type [MultiDict [str ]]
570
+ ) -> None :
571
+ items = [(str (i ), str (i )) for i in range (100 )]
572
+ md = any_multidict_class (items )
573
+
574
+ @benchmark
575
+ def _run () -> None :
576
+ for _ in md .keys ():
577
+ pass
578
+
579
+
580
+ def test_iterate_multidict_values (
581
+ benchmark : BenchmarkFixture , any_multidict_class : Type [MultiDict [str ]]
582
+ ) -> None :
583
+ items = [(str (i ), str (i )) for i in range (100 )]
584
+ md = any_multidict_class (items )
585
+
586
+ @benchmark
587
+ def _run () -> None :
588
+ for _ in md .values ():
589
+ pass
590
+
591
+ def test_iterate_multidict_items (
592
+ benchmark : BenchmarkFixture , any_multidict_class : Type [MultiDict [str ]]
593
+ ) -> None :
594
+ items = [(str (i ), str (i )) for i in range (100 )]
595
+ md = any_multidict_class (items )
596
+
597
+ @benchmark
598
+ def _run () -> None :
599
+ for _ , _ in md .items ():
600
+ pass
You can’t perform that action at this time.
0 commit comments