A pytest plugin that allows parametrizing test functions with values read from external config files (JSON, TOML, YAML, INI, etc.). Version 0.21.0 supports Python ~=3.8. Releases are infrequent, typically a few times per year.
pip install parametrize-from-fileNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
The decorator loads parameters from a file named after the test module (e.g., test_*.yaml). The file is expected in the same directory as the test file.
Use @parametrize_from_file(format='yaml') or rename/convert files to JSON.
Ensure @parametrize_from_file is the outermost decorator (i.e., directly above the test function, below any @pytest.mark.*).
Use @parametrize_from_file(source='...') instead.
Remove the --parametrize-from-file-format argument and specify format within the decorator: @parametrize_from_file(format='yaml').
Use @parametrize_from_file() with parentheses, even if no arguments are passed.
Specify the file explicitly: @parametrize_from_file(source='data.yaml').
No dependency data recorded yet.