Changeset 3c852d4 in sasmodels
- Timestamp:
- Oct 10, 2016 9:30:02 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:
- 479d0f3
- Parents:
- ed10b57
- Location:
- sasmodels
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/custom/__init__.py
r2a0c7a6 r3c852d4 8 8 to occur without error. 9 9 """ 10 from __future__ import division, print_function 10 11 12 import sys 11 13 import os 12 14 from os.path import basename, splitext … … 26 28 def load_module_from_path(fullname, path): 27 29 """load module from *path* as *fullname*""" 30 # Clear out old definitions, if any 31 if fullname in sys.modules: 32 del sys.modules[fullname] 28 33 module = imp.load_source(fullname, os.path.expanduser(path)) 29 34 #os.unlink(path+"c") # remove the automatic pyc file -
sasmodels/model_test.py
r897ca7f r3c852d4 288 288 stream.writeln(tb) 289 289 290 # Check if there are user defined tests. 291 # Yes, it is naughty to peek into the structure of the test suite, and 292 # to assume that it contains only one test. 293 if not suite._tests[0].info.tests: 294 stream.writeln("Note: %s has no user defined tests."%model) 290 # Warn if there are no user defined tests. 291 # Note: the test suite constructed above only has one test in it, which 292 # runs through some smoke tests to make sure the model runs, then runs 293 # through the input-output pairs given in the model definition file. To 294 # check if any such pairs are defined, therefore, we just need to check if 295 # they are in the first test of the test suite. We do this with an 296 # iterator since we don't have direct access to the list of tests in the 297 # test suite. 298 for test in suite: 299 if not test.info.tests: 300 stream.writeln("Note: %s has no user defined tests."%model) 301 break 302 else: 303 stream.writeln("Note: no test suite created --- this should never happen") 295 304 296 305
Note: See TracChangeset
for help on using the changeset viewer.