Changeset 8548d739 in sasview for src/sas/qtgui/UnitTesting
- Timestamp:
- Nov 29, 2016 8:08:29 AM (8 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:
- ded2ce3
- Parents:
- adf81b8
- git-author:
- Piotr Rozyczko <rozyczko@…> (11/29/16 08:04:46)
- git-committer:
- Piotr Rozyczko <rozyczko@…> (11/29/16 08:08:29)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/UnitTesting/GuiUtilsTest.py
r31c5b58 r8548d739 73 73 self.assertIn(signal, dir(com)) 74 74 75 76 def testUpdateModelItem(self): 77 """ 78 Test the QModelItem update method 75 def testupdateModelItem(self): 76 """ 77 Test the generic QModelItem update method 78 """ 79 test_item = QtGui.QStandardItem() 80 test_list = ['aa', 4, True, ] 81 name = "Black Sabbath" 82 83 # update the item 84 updateModelItem(test_item, test_list, name) 85 86 # Make sure test_item got all data added 87 self.assertEqual(test_item.child(0).text(), name) 88 list_from_item = test_item.child(0).data().toList() 89 self.assertIsInstance(list_from_item, list) 90 self.assertEqual(list_from_item[0].toPyObject(), test_list[0]) 91 self.assertEqual(list_from_item[1].toPyObject(), test_list[1]) 92 self.assertEqual(list_from_item[2].toPyObject(), test_list[2]) 93 94 def testupdateModelItemWithPlot(self): 95 """ 96 Test the QModelItem checkbox update method 79 97 """ 80 98 test_item = QtGui.QStandardItem() … … 84 102 85 103 # update the item 86 updateModelItem (test_item, update_data, name)104 updateModelItemWithPlot(test_item, update_data, name) 87 105 88 106 # Make sure test_item got all data added
Note: See TracChangeset
for help on using the changeset viewer.