Changeset 040529d in sasview for src/sas/qtgui/UnitTesting


Ignore:
Timestamp:
Dec 2, 2016 8:27:17 AM (7 years ago)
Author:
trnielsen
Branches:
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
Children:
fca1f50
Parents:
363fbfa
Message:

Update SasView?-249 with code review from PR

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/UnitTesting/KiessigCalculatorTest.py

    r363fbfa r040529d  
    3535 
    3636        # this should not rise 
    37         self.widget.on_help() 
     37        self.widget.onHelp() 
    3838 
    3939    def testComplexEntryNumbers(self): 
    4040        """ User entered compound calculations and subsequent reset""" 
    4141 
    42         self.widget.deltaq_in.insert("2.0") 
    43  
     42        self.widget.deltaq_in.clear() 
     43        self.widget.deltaq_in.insert('0.05') 
     44        # 
    4445        # Push Compute with the left mouse button 
    4546        computeButton = self.widget.computeButton 
    4647        QTest.mouseClick(computeButton, Qt.LeftButton) 
    47         self.assertEqual(self.widget.lengthscale_out.text(), '3.1416') 
     48        self.assertEqual(self.widget.lengthscale_out.text(), '125.664') 
     49 
     50    def testComplexEntryNumbers2(self): 
     51        """ User entered compound calculations and subsequent reset""" 
     52 
     53        self.widget.deltaq_in.clear() 
     54        self.widget.deltaq_in.insert('1.0') 
     55        # 
     56        # Push Compute with the left mouse button 
     57        computeButton = self.widget.computeButton 
     58        QTest.mouseClick(computeButton, Qt.LeftButton) 
     59        self.assertEqual(self.widget.lengthscale_out.text(), '6.283') 
     60 
     61    def testComplexEntryNumbers3(self): 
     62        """ User entered compound calculations and subsequent reset""" 
     63 
     64        self.widget.deltaq_in.clear() 
     65        self.widget.deltaq_in.insert('2.0') 
     66        # 
     67        # Push Compute with the left mouse button 
     68        computeButton = self.widget.computeButton 
     69        QTest.mouseClick(computeButton, Qt.LeftButton) 
     70        self.assertEqual(self.widget.lengthscale_out.text(), '3.142') 
    4871 
    4972    def testComplexEntryLetters(self): 
Note: See TracChangeset for help on using the changeset viewer.