Changeset 35ec279 in sasview
- Timestamp:
- Feb 13, 2015 4:08:43 AM (10 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:
- b9a5f0e
- Parents:
- 8c9ffde
- Location:
- test
- Files:
-
- 24 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
test/README.rst
r6c00702 r35ec279 9 9 only need to rebuild between tests if you are modifying the C code. 10 10 11 Tests can be run in Eclipse (or other IDE) by selecting *utest_sa nsview.py*11 Tests can be run in Eclipse (or other IDE) by selecting *utest_sasview.py* 12 12 and selecting run. This will run all of the tests. To run tests for one 13 one package, edit the *utest_sa nsview.py* run command and add the package13 one package, edit the *utest_sasview.py* run command and add the package 14 14 directory to the command arguments. To run an individual test, 15 15 select *run_one.py* and edit the command arguments to include the path to -
test/calculatorview/test/utest_gui_sld.py
r5777106 r35ec279 19 19 """ 20 20 self.app = wx.App() 21 from sa ns.perspectives.calculator.sld_panel import SldWindow21 from sas.perspectives.calculator.sld_panel import SldWindow 22 22 self.sld_frame = SldWindow() 23 23 -
test/park_integration/test/batch_fit.py
re3efa6b3 r35ec279 2 2 import time 3 3 import unittest 4 from sa ns.dataloader.loader import Loader5 from sa ns.fit.Fitting import Fit6 from sa ns.models.CylinderModel import CylinderModel7 import sa ns.models.dispersion_models8 from sa ns.models.qsmearing import smear_selection4 from sas.dataloader.loader import Loader 5 from sas.fit.Fitting import Fit 6 from sas.models.CylinderModel import CylinderModel 7 import sas.models.dispersion_models 8 from sas.models.qsmearing import smear_selection 9 9 10 10 NPTS = 1 … … 33 33 self.list_of_constraints = [] 34 34 self.list_of_mapper = [] 35 self.polydisp = sa ns.models.dispersion_models.models35 self.polydisp = sas.models.dispersion_models.models 36 36 self.qmin = qmin 37 37 self.qmax = qmin -
test/park_integration/test/utest_fit_cylinder.py
reff93b8 r35ec279 6 6 import math 7 7 8 from sa ns.fit.AbstractFitEngine import Model9 from sa ns.fit.Fitting import Fit10 from sa ns.dataloader.loader import Loader8 from sas.fit.AbstractFitEngine import Model 9 from sas.fit.Fitting import Fit 10 from sas.dataloader.loader import Loader 11 11 12 12 #@unittest.skip("") … … 17 17 self.data = Loader().load("cyl_400_20.txt") 18 18 # Create model that fitting engine understands 19 from sa ns.models.CylinderModel import CylinderModel19 from sas.models.CylinderModel import CylinderModel 20 20 self.model = CylinderModel() 21 21 self.model.setParam("scale", 1.0) … … 70 70 71 71 # Receives the type of model for the fitting 72 from sa ns.models.CylinderModel import CylinderModel72 from sas.models.CylinderModel import CylinderModel 73 73 cyl1 = CylinderModel() 74 74 cyl1.name = "C1" -
test/park_integration/test/utest_fit_line.py
re3efa6b3 r35ec279 6 6 import math 7 7 8 from sa ns.fit.AbstractFitEngine import Model, FitHandler9 from sa ns.dataloader.loader import Loader10 from sa ns.fit.Fitting import Fit11 from sa ns.models.LineModel import LineModel12 from sa ns.models.Constant import Constant8 from sas.fit.AbstractFitEngine import Model, FitHandler 9 from sas.dataloader.loader import Loader 10 from sas.fit.Fitting import Fit 11 from sas.models.LineModel import LineModel 12 from sas.models.Constant import Constant 13 13 14 14 class testFitModule(unittest.TestCase): -
test/park_integration/test/utest_fit_smeared.py
re3efa6b3 r35ec279 7 7 8 8 import numpy 9 from sa ns.fit.AbstractFitEngine import Model10 from sa ns.fit.Fitting import Fit11 from sa ns.dataloader.loader import Loader12 from sa ns.models.qsmearing import smear_selection13 from sa ns.models.CylinderModel import CylinderModel14 from sa ns.models.SphereModel import SphereModel9 from sas.fit.AbstractFitEngine import Model 10 from sas.fit.Fitting import Fit 11 from sas.dataloader.loader import Loader 12 from sas.models.qsmearing import smear_selection 13 from sas.models.CylinderModel import CylinderModel 14 from sas.models.SphereModel import SphereModel 15 15 16 16 class testFitModule(unittest.TestCase): … … 157 157 158 158 # Model: maybe there's a better way to do this. 159 # Ideally we should have to create a new model from our sa ns model.159 # Ideally we should have to create a new model from our sas model. 160 160 fitter.set_model(Model(self.sphere),1, ['radius','scale', 'background']) 161 161 -
test/park_integration/test/utest_park_scipy.py
re544c84 r35ec279 6 6 import math 7 7 8 from sa ns.guiframe.dataFitting import Data1D9 from sa ns.fit.AbstractFitEngine import Model,FitData1D10 from sa ns.fit.Fitting import Fit11 from sa ns.dataloader.loader import Loader12 from sa ns.models.MultiplicationModel import MultiplicationModel13 from sa ns.models.CylinderModel import CylinderModel14 from sa ns.models.SquareWellStructure import SquareWellStructure8 from sas.guiframe.dataFitting import Data1D 9 from sas.fit.AbstractFitEngine import Model,FitData1D 10 from sas.fit.Fitting import Fit 11 from sas.dataloader.loader import Loader 12 from sas.models.MultiplicationModel import MultiplicationModel 13 from sas.models.CylinderModel import CylinderModel 14 from sas.models.SquareWellStructure import SquareWellStructure 15 15 16 16 class testFitModule(unittest.TestCase): -
test/park_integration/test/utest_small_test.py
r76f132a r35ec279 4 4 import unittest 5 5 import math 6 from sa ns.fit.Fitting import Fit7 from sa ns.dataloader.loader import Loader6 from sas.fit.Fitting import Fit 7 from sas.dataloader.loader import Loader 8 8 9 9 class testFitModule(unittest.TestCase): … … 16 16 fitter = Fit('scipy') 17 17 # Receives the type of model for the fitting 18 from sa ns.models.CylinderModel import CylinderModel18 from sas.models.CylinderModel import CylinderModel 19 19 model = CylinderModel() 20 20 model.setParam('sldCyl', 1) -
test/pr_inversion/test/test_module.py
r5777106 r35ec279 1 from sa ns.pr.core.pr_inversion import Cinvertor1 from sas.pr.core.pr_inversion import Cinvertor 2 2 import numpy 3 3 -
test/pr_inversion/test/utest_explorer.py
r5777106 r35ec279 5 5 import unittest, math, numpy 6 6 from utest_invertor import load 7 from sa ns.pr.invertor import Invertor8 from sa ns.pr.distance_explorer import DistExplorer7 from sas.pr.invertor import Invertor 8 from sas.pr.distance_explorer import DistExplorer 9 9 10 10 class TestExplorer(unittest.TestCase): -
test/pr_inversion/test/utest_invertor.py
r95fb3e8 r35ec279 9 9 10 10 import unittest, math, numpy 11 from sa ns.pr.invertor import Invertor11 from sas.pr.invertor import Invertor 12 12 13 13 class TestFiguresOfMerit(unittest.TestCase): -
test/sascalculator/test/utest_resolution_calculator.py
r8c9ffde r35ec279 4 4 5 5 import unittest 6 from sa ns.calculator.resolution_calculator import ResolutionCalculator \6 from sas.calculator.resolution_calculator import ResolutionCalculator \ 7 7 as calculator 8 8 -
test/sascalculator/test/utest_sans_gen.py
r8c9ffde r35ec279 1 1 """ 2 Unit tests for the sa ns_gen2 Unit tests for the sas_gen 3 3 """ 4 4 import warnings … … 6 6 7 7 import unittest 8 from sa ns.calculator import sans_gen9 from sa ns.models.SphereModel import SphereModel8 from sas.calculator import sas_gen 9 from sas.models.SphereModel import SphereModel 10 10 11 11 import numpy … … 13 13 import os.path 14 14 15 class sa ns_gen_test(unittest.TestCase):15 class sas_gen_test(unittest.TestCase): 16 16 17 17 def setUp(self): 18 self.sldloader = sa ns_gen.SLDReader()19 self.pdbloader = sa ns_gen.PDBReader()20 self.omfloader = sa ns_gen.OMFReader()18 self.sldloader = sas_gen.SLDReader() 19 self.pdbloader = sas_gen.PDBReader() 20 self.omfloader = sas_gen.OMFReader() 21 21 self.comp = SphereModel() 22 22 … … 44 44 """ 45 45 f = self.omfloader.read("A_Raw_Example-1.omf") 46 output = sa ns_gen.OMF2SLD()46 output = sas_gen.OMF2SLD() 47 47 output.set_data(f) 48 48 self.assertEqual(f.mx[0], 0) … … 57 57 sld_data = self.sldloader.read("sphere697_r30.sld") 58 58 # Generic computation 59 model = sa ns_gen.GenSAS()59 model = sas_gen.GenSAS() 60 60 model.setParam('background', 0.0) 61 61 model.setParam('scale', 1.0) -
test/sascalculator/test/utest_slit_length_calculator.py
r8c9ffde r35ec279 4 4 5 5 import unittest 6 from sa ns.dataloader.readers.ascii_reader import Reader7 from sa ns.calculator.slit_length_calculator import SlitlengthCalculator as calculator6 from sas.dataloader.readers.ascii_reader import Reader 7 from sas.calculator.slit_length_calculator import SlitlengthCalculator as calculator 8 8 9 9 import os.path -
test/sasdataloader/plugins/test_reader.py
r8c9ffde r35ec279 9 9 """ 10 10 import numpy, os 11 from sa ns.dataloader.data_info import Data1D11 from sas.dataloader.data_info import Data1D 12 12 13 13 -
test/sasdataloader/test/error_conditions.py
r8c9ffde r35ec279 1 from sa ns.dataloader.loader import Loader1 from sas.dataloader.loader import Loader 2 2 import unittest 3 3 -
test/sasdataloader/test/testLoad.py
r8c9ffde r35ec279 14 14 import unittest 15 15 import math 16 import sa ns.dataloader17 from sa ns.dataloader.loader import Loader16 import sas.dataloader 17 from sas.dataloader.loader import Loader 18 18 19 19 # Check whether we should test image loading on this system -
test/sasdataloader/test/testplugings.py
r8c9ffde r35ec279 4 4 5 5 import unittest 6 from sa ns.dataloader.loader import Loader, Registry6 from sas.dataloader.loader import Loader, Registry 7 7 class testLoader(unittest.TestCase): 8 8 -
test/sasdataloader/test/utest_abs_reader.py
r8c9ffde r35ec279 5 5 import unittest 6 6 import numpy, math 7 from sa ns.dataloader.loader import Loader8 from sa ns.dataloader.data_info import Data1D7 from sas.dataloader.loader import Loader 8 from sas.dataloader.data_info import Data1D 9 9 10 10 import os.path … … 13 13 14 14 def setUp(self): 15 from sa ns.dataloader.readers.abs_reader import Reader15 from sas.dataloader.readers.abs_reader import Reader 16 16 self.data = Reader().read("jan08002.ABS") 17 17 … … 311 311 312 312 def test_writer(self): 313 from sa ns.dataloader.readers.cansas_reader import Reader313 from sas.dataloader.readers.cansas_reader import Reader 314 314 r = Reader() 315 315 x = numpy.ones(5) -
test/sasdataloader/test/utest_ascii.py
r8c9ffde r35ec279 6 6 7 7 import unittest 8 from sa ns.dataloader.loader import Loader8 from sas.dataloader.loader import Loader 9 9 10 10 import os.path -
test/sasdataloader/test/utest_averaging.py
r8c9ffde r35ec279 2 2 import unittest 3 3 4 from sa ns.dataloader.loader import Loader5 from sa ns.dataloader.manipulations import Ring, CircularAverage, SectorPhi, get_q,reader2D_converter4 from sas.dataloader.loader import Loader 5 from sas.dataloader.manipulations import Ring, CircularAverage, SectorPhi, get_q,reader2D_converter 6 6 7 7 import os.path 8 8 import numpy, math 9 import sa ns.dataloader.data_info as data_info9 import sas.dataloader.data_info as data_info 10 10 11 11 class Averaging(unittest.TestCase): … … 137 137 The test data was not generated by IGOR. 138 138 """ 139 from sa ns.dataloader.manipulations import Boxsum, Boxavg139 from sas.dataloader.manipulations import Boxsum, Boxavg 140 140 141 141 r = Boxsum(x_min=.01, x_max=.015, y_min=0.01, y_max=0.015) … … 155 155 The test data was not generated by IGOR. 156 156 """ 157 from sa ns.dataloader.manipulations import SlabX157 from sas.dataloader.manipulations import SlabX 158 158 159 159 r = SlabX(x_min=-.01, x_max=.01, y_min=-0.0002, y_max=0.0002, bin_width=0.0004) … … 172 172 The test data was not generated by IGOR. 173 173 """ 174 from sa ns.dataloader.manipulations import SlabY174 from sas.dataloader.manipulations import SlabY 175 175 176 176 r = SlabY(x_min=.005, x_max=.01, y_min=-0.01, y_max=0.01, bin_width=0.0004) … … 191 191 The test data was not generated by IGOR. 192 192 """ 193 from sa ns.dataloader.manipulations import SectorPhi193 from sas.dataloader.manipulations import SectorPhi 194 194 import math 195 195 … … 209 209 The test data was not generated by IGOR. 210 210 """ 211 from sa ns.dataloader.manipulations import SectorPhi211 from sas.dataloader.manipulations import SectorPhi 212 212 import math 213 213 … … 227 227 The test data was not generated by IGOR. 228 228 """ 229 from sa ns.dataloader.manipulations import SectorQ229 from sas.dataloader.manipulations import SectorQ 230 230 import math 231 231 -
test/sasdataloader/test/utest_cansas.py
r8c9ffde r35ec279 6 6 warnings.simplefilter("ignore") 7 7 8 import sa ns.dataloader.readers.cansas_reader as cansas9 from sa ns.dataloader.loader import Loader10 from sa ns.dataloader.data_info import Data1D11 from sa ns.dataloader.readers.xml_reader import XMLreader12 from sa ns.dataloader.readers.cansas_reader import Reader13 from sa ns.dataloader.readers.cansas_constants import CansasConstants8 import sas.dataloader.readers.cansas_reader as cansas 9 from sas.dataloader.loader import Loader 10 from sas.dataloader.data_info import Data1D 11 from sas.dataloader.readers.xml_reader import XMLreader 12 from sas.dataloader.readers.cansas_reader import Reader 13 from sas.dataloader.readers.cansas_constants import CansasConstants 14 14 15 15 import os -
test/sasdataloader/test/utest_red2d_reader.py
r8c9ffde r35ec279 6 6 7 7 import unittest 8 from sa ns.dataloader.loader import Loader8 from sas.dataloader.loader import Loader 9 9 10 10 import os.path -
test/sasguiframe/test/utest_manipulations.py
r8c9ffde r35ec279 6 6 import unittest 7 7 import numpy, math 8 from sa ns.dataloader.loader import Loader9 from sa ns.guiframe.dataFitting import Data1D, Data2D10 from sa ns.guiframe.dataFitting import Data1D as Theory1D8 from sas.dataloader.loader import Loader 9 from sas.guiframe.dataFitting import Data1D, Data2D 10 from sas.guiframe.dataFitting import Data1D as Theory1D 11 11 12 12 import os.path -
test/utest_sasview.py
r95fb3e8 r35ec279 19 19 HAS_MPL_WX = False 20 20 21 SKIPPED_DIRS = ["sa nsrealspace", "calculatorview"]21 SKIPPED_DIRS = ["sasrealspace", "calculatorview"] 22 22 if not HAS_MPL_WX: 23 SKIPPED_DIRS.append("sa nsguiframe")23 SKIPPED_DIRS.append("sasguiframe") 24 24 25 25 #COMMAND_SEP = ';'
Note: See TracChangeset
for help on using the changeset viewer.