chore(pytest): give parameterized tests the option to use functions as a value
ref: #770
This commit is contained in:
@ -206,6 +206,10 @@ def pytest_generate_tests(metafunc):
|
||||
|
||||
ids_name += '_' + getattr(item[1][key], '__name__', 'err_generate_tests').lower()
|
||||
|
||||
elif callable(item[1][key]):
|
||||
|
||||
ids_name += '_' + item[1][key].__name__
|
||||
|
||||
else:
|
||||
|
||||
ids_name += '_' + str(item[1][key]).lower()
|
||||
|
Reference in New Issue
Block a user