chore(pytest): give parameterized tests the option to use functions as a value

ref: #770
This commit is contained in:
2025-05-21 05:11:42 +09:30
parent 5aae562caf
commit 95281d35eb

View File

@ -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()