Changeset 479d0f3 in sasmodels
- Timestamp:
- Oct 10, 2016 11:17:15 AM (8 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 8f93522, e77872e
- Parents:
- 3c852d4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/model_test.py
r3c852d4 r479d0f3 121 121 122 122 # test using dll if desired 123 if 'dll' in loaders :123 if 'dll' in loaders or not core.HAVE_OPENCL: 124 124 test_name = "Model: %s, Kernel: dll"%model_name 125 125 test_method_name = "test_%s_dll" % model_info.id … … 270 270 271 271 # Build a test suite containing just the model 272 loaders = ['opencl'] 272 loaders = ['opencl'] if core.HAVE_OPENCL else ['dll'] 273 273 models = [model] 274 274 try: … … 334 334 models = models[1:] 335 335 elif models and models[0] == 'opencl_and_dll': 336 loaders = ['opencl', 'dll'] 336 loaders = ['opencl', 'dll'] if core.HAVE_OPENCL else ['dll'] 337 337 models = models[1:] 338 338 else: 339 loaders = ['opencl', 'dll'] 339 loaders = ['opencl', 'dll'] if core.HAVE_OPENCL else ['dll'] 340 340 if not models: 341 341 print("""\ … … 366 366 Run "nosetests sasmodels" on the command line to invoke it. 367 367 """ 368 tests = make_suite(['opencl', 'dll'], ['all']) 368 loaders = ['opencl', 'dll'] if core.HAVE_OPENCL else ['dll'] 369 tests = make_suite(loaders, ['all']) 369 370 for test_i in tests: 370 yield test_i.run_all 371 # In order for nosetest to see the correct test name, need to set 372 # the description attribute of the returned function. Since we 373 # can't do this for the returned instance, wrap it in a lambda and 374 # set the description on the lambda. Otherwise we could just do: 375 # yield test_i.run_all 376 L = lambda: test_i.run_all() 377 L.description = test_i.test_name 378 yield L 371 379 372 380
Note: See TracChangeset
for help on using the changeset viewer.