<div dir="ltr">Hi,<div><br></div><div>Using py.test (version 2.5.0) i would like to run a number of test on a user select-able platform with multiple configurations.  A platform is a bunch measurement instruments, and  hardware under test. The tests are not aware on which specific platform they run, nor how the platform is configured, they get a platform fixture object and do stuff with it.</div>
<div><br></div><div>Using two parser arguments &quot;--platform&quot; and  &quot;--config&quot;&quot; the user can select a platform and a platform config. The platform fixture function gets the options from the request object, creates, configures and returns the platform. So far so good.</div>
<div><br></div><div>However, test need to run for many configs (range 100) on  a single platform, configs are grouped in sets. The user should be able to select the config set. Instead of selecting a single config i would like to select a set, the &quot;&quot;--config&quot; option is now the name (string) referring to a factory function generating a list of configs. But i`m stuck on how to parameterize the platform fixture function using the &quot;--config&quot; parser option. The fixture decorator has a &quot;parameters&quot; argument to parameterize a fixture, which can do the trick for a hardcoded config set, but how to set the values based on a parser option? I also tried to use pytest.yield_fixture, but this supports only a single yield statement :-(.</div>
<div><br></div><div>Any ideas?</div><div><br></div><div>Thanks,</div><div><br></div><div>Wouter</div><div><br></div><div><br></div></div>