parametrize_from_file.load_parameters(path, key, *, loaders=None, preprocess=None, schema=None)

Load test parameters from a file.


  • A list of parameter names

  • A list of pytest.param instances

Return type:


This function does almost the same thing as @parametrize, except that instead of decorating a test function, it simply returns the parameters it loads. This might be useful in some unusual situations. For example, you could use this function to load test parameters from a file in order to merge them with parameters derived from some other source and apply them all to the same test function.