parametrize_from_file.fixture

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

Parametrize a fixture function with values read from a config file.

Parameters:

Fixtures allow multiple test functions to be initialized in the same way. Fixtures can be parametrized, in which case the fixture will be reinitialized (and any dependent test functions rerun) for each parameter.

This decorator creates a fixture function with parameters read from a config file. The parameters are made available to the function via request.param (the function must accept an argument named request). Specifically, request.param will be a collections.namedtuple containing a single set of parameters. The parameters should be accessed by name only; the order of the parameters in the tuple is not guaranteed to be anything in particular. Any ids and/or marks associated with the parameters will be correctly handled.