From 928a0dc94b6ae5f87b069a9e991edd44cefe4c4d Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Thu, 17 Sep 2009 21:27:32 -0400 Subject: [PATCH] Make sure test_wrapper -v outputs usable device/platform ids. --- test/test_wrapper.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/test_wrapper.py b/test/test_wrapper.py index a2802991..8d99e080 100644 --- a/test/test_wrapper.py +++ b/test/test_wrapper.py @@ -191,12 +191,15 @@ def pytest_generate_tests(metafunc): if "context" in metafunc.funcargnames: arg_dict["context"] = cl.Context([device]) - metafunc.addcall(funcargs=arg_dict.copy()) + metafunc.addcall(funcargs=arg_dict.copy(), + id=", ".join("%s=%s" % (arg, value) + for arg, value in arg_dict.iteritems())) elif "platform" in metafunc.funcargnames: for platform in cl.get_platforms(): metafunc.addcall( - funcargs=dict(platform=platform)) + funcargs=dict(platform=platform), + id=str(platform)) if __name__ == "__main__": -- GitLab