Ignore:
Timestamp:
Jun 14, 2016 4:51:18 AM (8 years ago)
Author:
Piotr Rozyczko <piotr.rozyczko@…>
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:
a281ab8
Parents:
488c49d
Message:

threaded file load, data object related fixes, more unit tests.

File:
1 edited

Legend:

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

    r488c49d r5032ea68  
    1818    def testQtSignalSpy(self): 
    1919        '''Create the Spy the correct way''' 
     20        test_string = 'my precious' 
    2021 
     22        def signalReceived(signal): 
     23            # Test the signal callback 
     24            self.assertEqual(signal, test_string) 
     25 
     26        communicator = Communicate() 
     27        communicator.statusBarUpdateSignal.connect(signalReceived) 
     28 
     29        # Define the signal spy for testing 
    2130        widget = QWidget() 
    22         signal = Communicate.statusBarUpdateSignal 
    23         self.spy = QtSignalSpy(widget, signal) 
     31        spy = QtSignalSpy(widget, communicator.statusBarUpdateSignal) 
    2432 
    2533        # Emit a signal 
    26         signal.emit('aa') 
     34        communicator.statusBarUpdateSignal.emit(test_string) 
    2735 
    28         # Test the spy object 
     36        # Was the signal caught by the signal spy? 
     37        self.assertEqual(spy.count(), 1) 
    2938 
    3039if __name__ == "__main__": 
Note: See TracChangeset for help on using the changeset viewer.