Changes in / [750ffa5:c71da73] in sasmodels
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/model_test.py
rddfe69c r1b50776 115 115 if not ispy and ('opencl' in loaders and load_model_cl): 116 116 test_name = "Model: %s, Kernel: OpenCL"%model_name 117 test_method = "test_%s_opencl" % model_name 117 118 test = ModelTestCase(test_name, model_definition, 118 load_model_cl, tests )119 load_model_cl, tests, test_method) 119 120 #print "defining", test_name 120 121 suite.addTest(test) … … 123 124 if ispy or ('dll' in loaders and load_model_dll): 124 125 test_name = "Model: %s, Kernel: dll"%model_name 126 test_method = "test_%s_dll" % model_name 125 127 test = ModelTestCase(test_name, model_definition, 126 load_model_dll, tests) 127 #print "defining", test_name 128 load_model_dll, tests, test_method) 128 129 suite.addTest(test) 129 130 … … 132 133 def _hide_model_case_from_nosetests(): 133 134 class ModelTestCase(unittest.TestCase): 134 def __init__(self, test_name, definition, loader, tests): 135 unittest.TestCase.__init__(self) 136 135 def __init__(self, test_name, definition, loader, tests, test_method): 137 136 self.test_name = test_name 138 137 self.definition = definition … … 140 139 self.tests = tests 141 140 142 def runTest(self): 141 setattr(self, test_method, self._runTest) 142 unittest.TestCase.__init__(self, test_method) 143 144 def _runTest(self): 143 145 try: 144 146 model = self.loader(self.definition) … … 191 193 192 194 193 # let nosetests sniff out the tests194 def model_tests():195 tests = make_suite(['opencl','dll'],['all'])196 for test_i in tests:197 yield test_i.runTest198 195 199 196 def main():
Note: See TracChangeset
for help on using the changeset viewer.