- Timestamp:
- Apr 6, 2014 7:29:59 AM (11 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 95d58d3
- Parents:
- 960fdbb
- Location:
- test
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
test/park_integration/test/test_fit_line.py
rda5d8e8 r6fe5100 4 4 """ 5 5 import unittest 6 import math 6 7 7 8 from sans.fit.AbstractFitEngine import Model … … 11 12 from sans.models.Constant import Constant 12 13 13 import math14 14 class testFitModule(unittest.TestCase): 15 15 """ test fitting """ … … 21 21 data.name = data.filename 22 22 #Importing the Fit module 23 fitter = Fit('scipy') 23 from bumps import fitters 24 fitters.FIT_DEFAULT = 'dream' 25 print fitters.FIT_OPTIONS['dream'].__dict__ 26 fitter = Fit('bumps') 24 27 # Receives the type of model for the fitting 25 28 model1 = LineModel() … … 44 47 self.assertTrue( result1.fitness/len(data.x) < 2 ) 45 48 49 return 46 50 #fit with park test 47 51 fitter = Fit('park') … … 103 107 assert str(msg)=="Scipy can't fit more than a single fit problem at a time." 104 108 else: raise AssertionError,"No error raised for scipy fitting with more than 2 models" 105 109 110 return 106 111 #fit with park test 107 112 fitter = Fit('park') … … 121 126 def test3(self): 122 127 """ fit 2 data and 2 model with 1 constrainst""" 128 return 123 129 #load data 124 130 l = Loader() … … 189 195 190 196 result1, = fitter.fit() 197 #print(result1) 191 198 self.assert_(result1) 192 199 … … 194 201 self.assertTrue( math.fabs(result1.pvec[1]-2.5)/3 <= result1.stderr[1]) 195 202 self.assertTrue( result1.fitness/len(data1.x) < 2 ) 196 203 204 return 197 205 #fit with park test 198 206 fitter = Fit('park') … … 213 221 self.assertAlmostEquals( result1.stderr[1],result2.stderr[1] ) 214 222 self.assertTrue( result2.fitness/(len(data2.x)+len(data1.x)) < 2 ) 215 216 223 224 225 if __name__ == "__main__": 226 unittest.main() 217 227 218 -
test/pr_inversion/test/test_output.txt
r6c00702 r6fe5100 3 3 #alpha=0.0007 4 4 #chi2=836.797 5 #elapsed=0.000 9999285 #elapsed=0.000168085 6 6 #qmin=None 7 7 #qmax=None -
test/run_one.py
r6c00702 r6fe5100 1 #!/usr/bin/env python 2 1 3 import os 2 4 import sys … … 12 14 #print "\n".join(sys.path) 13 15 test_path,test_file = splitpath(sys.argv[1]) 14 print " test file",sys.argv[1]16 print "=== testing:",sys.argv[1] 15 17 #print test_path, test_file 16 18 sys.argv = [sys.argv[0]] … … 19 21 test = imp.load_source('tests',test_file) 20 22 unittest.main(test, testRunner=xmlrunner.XMLTestRunner(output='logs')) 21 -
test/utest_sansview.py
r6c00702 r6fe5100 1 #!/usr/bin/env python 1 2 import os 2 3 import subprocess
Note: See TracChangeset
for help on using the changeset viewer.