title: Lazy parametrization with pytest
body: <p>When parametrizing tests and fixtures in pytest, pytest seem to eagerly evaluate all parameters and to construct some test list datastructure before starting to execute the tests.</p>
  
  <p>This is a problem in 2 situations:</p>
  
  <ol>
  <li>when you have many parameter values (e.g. from a generator) - the generator and test itself may run fast but all those parameter values eat up all the memory</li>
  <li>when parametrizing a fixture with different kind of expensive resources, where you only can afford to run one resource at the same time (e.g. because they listen on the same port or something like that)</li>
  </ol>
  
  <p>Thus my question: Is it possibly to tell pytest to evaluate the parameters on the fly (i.e. lazily)?</p>