Clean up test generation to not use generators anymore and use parametrization

Note that this is broke on pytest 2.5 because of a regression so this is blocked for now