Changeset 7fb471d in sasview for src/sas/qtgui/MainWindow/UnitTesting
- Timestamp:
- Nov 9, 2017 8:41:56 AM (7 years ago)
- 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:
- 4992ff2
- Parents:
- cee5c78
- git-author:
- Piotr Rozyczko <rozyczko@…> (10/27/17 08:49:35)
- git-committer:
- Piotr Rozyczko <rozyczko@…> (11/09/17 08:41:56)
- Location:
- src/sas/qtgui/MainWindow/UnitTesting
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/MainWindow/UnitTesting/AboutBoxTest.py
r464cd07 r7fb471d 6 6 from PyQt4.QtTest import QTest 7 7 from PyQt4 import QtCore 8 from mock import MagicMock8 from unittest.mock import MagicMock 9 9 10 10 # set up import paths -
src/sas/qtgui/MainWindow/UnitTesting/DataExplorerTest.py
- Property mode changed from 100644 to 100755
rf7d14a1 r7fb471d 5 5 from PyQt4.QtTest import QTest 6 6 from PyQt4.QtCore import * 7 from mock import MagicMock8 from mock import patch7 from unittest.mock import MagicMock 8 from unittest.mock import patch 9 9 from mpl_toolkits.mplot3d import Axes3D 10 10 … … 157 157 158 158 expected_list = [0, 0, 33, 66, -1] 159 spied_list = [spy_progress_bar_update.called()[i]['args'][0] for i in xrange(5)]159 spied_list = [spy_progress_bar_update.called()[i]['args'][0] for i in range(5)] 160 160 self.assertEqual(expected_list, spied_list) 161 161 … … 325 325 self.form.cbSelect.setCurrentIndex(1) 326 326 327 self.form.show() 328 app.exec_() 329 327 330 # Test the current selection 328 331 item1D = self.form.model.item(0) … … 503 506 # We don't know the data ID, so need to iterate over dict 504 507 data_dict = spy_data_received.called()[0]['args'][0] 505 for data_key, data_value in data_dict.ite ritems():508 for data_key, data_value in data_dict.items(): 506 509 self.assertIsInstance(data_value, Data1D) 507 510 -
src/sas/qtgui/MainWindow/UnitTesting/GuiManagerTest.py
- Property mode changed from 100644 to 100755
r8222f171 r7fb471d 9 9 from PyQt4.QtCore import * 10 10 from PyQt4.QtWebKit import * 11 from mock import MagicMock11 from unittest.mock import MagicMock 12 12 13 13 # set up import paths … … 74 74 # We are in the MainWindow scope, so simple 'print' will work 75 75 message = "from stdout" 76 print message76 print(message) 77 77 self.assertIn(message, self.manager.logDockWidget.widget().toPlainText()) 78 78 … … 162 162 """ 163 163 # 1. version = 0.0.0 164 version_info = { u'version' : u'0.0.0'}164 version_info = {'version' : '0.0.0'} 165 165 spy_status_update = QtSignalSpy(self.manager, self.manager.communicate.statusBarUpdateSignal) 166 166 … … 172 172 173 173 # 2. version < LocalConfig.__version__ 174 version_info = { u'version' : u'0.0.1'}174 version_info = {'version' : '0.0.1'} 175 175 spy_status_update = QtSignalSpy(self.manager, self.manager.communicate.statusBarUpdateSignal) 176 176 … … 182 182 183 183 # 3. version > LocalConfig.__version__ 184 version_info = { u'version' : u'999.0.0'}184 version_info = {'version' : '999.0.0'} 185 185 spy_status_update = QtSignalSpy(self.manager, self.manager.communicate.statusBarUpdateSignal) 186 186 webbrowser.open = MagicMock() -
src/sas/qtgui/MainWindow/UnitTesting/MainWindowTest.py
r464cd07 r7fb471d 5 5 from PyQt4 import QtTest 6 6 from PyQt4 import QtCore 7 from mock import MagicMock7 from unittest.mock import MagicMock 8 8 9 9 # set up import paths
Note: See TracChangeset
for help on using the changeset viewer.