We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4ee88fb commit 2b933a2Copy full SHA for 2b933a2
conftest.py
@@ -287,6 +287,21 @@ def pytest_runtest_makereport(item, call):
287
result.outcome = 'passed'
288
289
290
+def pytest_make_parametrize_id(config, val, argname):
291
+ """
292
+ Prevents pytest to make obsucre parameter names (param0, param1, ...)
293
+ and default to str(val) instead for better log readability.
294
295
+ # First see if it has a name
296
+ if hasattr(val, '__name__'):
297
+ return val.__name__
298
+ # Then try str(val)
299
+ try:
300
+ return str(val)
301
+ except Exception:
302
+ return None # Fall back to default behavior
303
+
304
305
# A list of optimization options/pipelines to be used in testing
306
# regarding spatial and/or temporal blocking.
307
opts_tiling = ['advanced',
0 commit comments