parametrize_from_file
parametrize_from_file copied to clipboard
Add the ability to load values from python files
trafficstars
The basic idea would be to load the file and then to look in globals() for test cases, e.g.:
test_foo = [
dict(
given=1,
expected=2,
),
dict(
given=3,
expected=4,
),
...
]
test_bar = [
...
]
The trick is deciding what default file name to look for. I can't simply use the .py extension, because that would be the same name as the test file. Maybe I could use the _params.py suffix.