Changes in sasmodels/model_test.py [2d81cfe:a69d8cd] in sasmodels
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/model_test.py
r2d81cfe ra69d8cd 123 123 124 124 if is_py: # kernel implemented in python 125 test_name = " Model: %s, Kernel:python"%model_name125 test_name = "%s-python"%model_name 126 126 test_method_name = "test_%s_python" % model_info.id 127 127 test = ModelTestCase(test_name, model_info, … … 135 135 # test using dll if desired 136 136 if 'dll' in loaders or not core.HAVE_OPENCL: 137 test_name = " Model: %s, Kernel:dll"%model_name137 test_name = "%s-dll"%model_name 138 138 test_method_name = "test_%s_dll" % model_info.id 139 139 test = ModelTestCase(test_name, model_info, … … 146 146 # test using opencl if desired and available 147 147 if 'opencl' in loaders and core.HAVE_OPENCL: 148 test_name = " Model: %s, Kernel: OpenCL"%model_name148 test_name = "%s-opencl"%model_name 149 149 test_method_name = "test_%s_opencl" % model_info.id 150 150 # Using dtype=None so that the models that are only … … 469 469 loaders = ['opencl', 'dll'] if core.HAVE_OPENCL else ['dll'] 470 470 tests = make_suite(loaders, ['all']) 471 for test_i in tests: 472 # In order for nosetest to see the correct test name, need to set 473 # the description attribute of the returned function. Since we 474 # can't do this for the returned instance, wrap it in a lambda and 475 # set the description on the lambda. Otherwise we could just do: 476 # yield test_i.run_all 477 L = lambda: test_i.run_all() 478 L.description = test_i.test_name 479 yield L 471 for test in tests: 472 # In order for nosetest to show the test name, wrap the test.run_all 473 # instance in function that takes the test name as a parameter which 474 # will be displayed when the test is run. 475 yield lambda name: test.run_all(), test.test_name 480 476 481 477
Note: See TracChangeset
for help on using the changeset viewer.