Changeset 81751c2 in sasmodels for sasmodels/model_test.py
- Timestamp:
- Oct 25, 2018 6:16:04 PM (6 years ago)
- Branches:
- master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 869fd7b
- Parents:
- 39a06c9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/model_test.py
r39a06c9 r81751c2 64 64 from .kernelcl import use_opencl 65 65 from .kernelcuda import use_cuda 66 from . import product 66 67 67 68 # pylint: disable=unused-import … … 214 215 ({}, [0.001, 0.01, 0.1], [None]*3), 215 216 ({}, [(0.1, 0.1)]*2, [None]*2), 216 # test that Fq will run 217 # test that Fq will run, and return R_eff, V, V_r 217 218 ({}, 0.1, None, None, None, None, None), 218 219 ] … … 221 222 if self.info.tests is not None: 222 223 tests += self.info.tests 224 S_tests = [test for test in tests if '@S' in test[0]] 225 P_tests = [test for test in tests if '@S' not in test[0]] 223 226 try: 224 227 model = build_model(self.info, dtype=self.dtype, 225 228 platform=self.platform) 226 results = [self.run_one(model, test) for test in tests] 229 results = [self.run_one(model, test) for test in P_tests] 230 for test in S_tests: 231 # pull the S model name out of the test defn 232 pars = test[0].copy() 233 s_name = pars.pop('@S') 234 ps_test = [pars] + list(test[1:]) 235 # build the P@S model 236 s_info = load_model_info(s_name) 237 ps_info = product.make_product_info(self.info, s_info) 238 ps_model = build_model(ps_info, dtype=self.dtype, 239 platform=self.platform) 240 # run the tests 241 results.append(self.run_one(ps_model, ps_test)) 242 227 243 if self.stash: 228 244 for test, target, actual in zip(tests, self.stash[0], results):
Note: See TracChangeset
for help on using the changeset viewer.