Ignore:
Timestamp:
Mar 29, 2019 12:11:34 PM (6 years ago)
Author:
Piotr Rozyczko <piotr.rozyczko@…>
Branches:
ESS_GUI, ESS_GUI_opencl
Children:
7a1481f
Parents:
c02721c4
Message:

More unit test fixes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Calculators/UnitTesting/SLDCalculatorTest.py

    rc02721c4 r6edd344  
    1313 
    1414# Local 
    15 from sas.qtgui.Calculators.SldPanel import SldResult 
     15#from sas.qtgui.Calculators.SldPanel import SldResult 
    1616from sas.qtgui.Calculators.SldPanel import SldPanel 
    17 from sas.qtgui.Calculators.SldPanel import sldAlgorithm 
     17from sas.qtgui.Calculators.SldPanel import neutronSldAlgorithm, xraySldAlgorithm 
    1818from sas.qtgui.Utilities.GuiUtils import FormulaValidator 
    1919 
     
    2222if not QtWidgets.QApplication.instance(): 
    2323    app = QtWidgets.QApplication(sys.argv) 
    24  
    25 class SldResultTest(unittest.TestCase): 
    26     """ Test the simple container class""" 
    27     def testObjectSize(self): 
    28         results = SldResult(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 
    29                             0.0, 0.0, 0.0, 0.0, 0.0, 0.0) 
    30         self.assertEqual(sys.getsizeof(results), 56) 
    3124 
    3225 
     
    3831        wavelength = 6.0 
    3932         
    40         results = sldAlgorithm( molecular_formula, 
     33        results = neutronSldAlgorithm( molecular_formula, 
    4134                                mass_density, 
    4235                                wavelength) 
    43         self.assertIsInstance(results, SldResult) 
     36        #self.assertIsInstance(results, SldResult) 
    4437        self.assertAlmostEqual(results.neutron_length, 0.175463, 5) 
    4538        self.assertAlmostEqual(results.neutron_inc_xs, 5.365857, 5) 
     
    5144        wavelength = 666.0 
    5245         
    53         results = sldAlgorithm( molecular_formula, 
     46        results = neutronSldAlgorithm( molecular_formula, 
    5447                                mass_density, 
    5548                                wavelength) 
    56         self.assertIsInstance(results, SldResult) 
     49        #self.assertIsInstance(results, SldResult) 
    5750        self.assertAlmostEqual(results.neutron_length,   0.059402, 5) 
    5851        self.assertAlmostEqual(results.neutron_inc_xs,   0.145427, 5) 
Note: See TracChangeset for help on using the changeset viewer.