File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -158,3 +158,28 @@ def map(ctx):
158158
159159 nominal (output_dir = "/tmp" )
160160 assert seen == [("path/to/dataset.mcap" , "path/to/map.yaml" )]
161+
162+
163+ def test_input_hook_called_once_regardless_of_variants_and_iterations ():
164+ """Input hooks are resolved once, regardless of variants and iterations."""
165+ call_count = 0
166+
167+ @benchmark (
168+ variants = [
169+ {"sensor_model" : "beam" , "num_particles" : 10 },
170+ {"sensor_model" : "lidar" , "num_particles" : 20 },
171+ ],
172+ num_iterations = 3 ,
173+ )
174+ def nominal (ctx ):
175+ pass
176+
177+ @nominal .input
178+ def dataset (ctx ):
179+ nonlocal call_count
180+ call_count += 1
181+ return "path/to/dataset.mcap"
182+
183+ nominal (output_dir = "/tmp" )
184+
185+ assert call_count == 1
You can’t perform that action at this time.
0 commit comments