summaryrefslogtreecommitdiff
path: root/sc/qa/uitest/calc_tests6
diff options
context:
space:
mode:
authorChenxiong Qi <qcxhome@gmail.com>2023-12-20 20:54:05 +0800
committerHossein <hossein@libreoffice.org>2024-01-23 14:00:46 +0100
commit74de0ebb810f3e13c45f01c63067cb8de794ce3c (patch)
treeb5f069ad74d12b5ce095b4ad9159861fd1445614 /sc/qa/uitest/calc_tests6
parent3a20c691ab1d6a16ad0fc144926b22c098552be4 (diff)
tdf#97361 Make unittests more pythonic: XIndexAccess
Change-Id: I05ef274dd0ad5dc35b5455cfc01feabc6c0820a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161276 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
Diffstat (limited to 'sc/qa/uitest/calc_tests6')
-rw-r--r--sc/qa/uitest/calc_tests6/moveCopySheet.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/sc/qa/uitest/calc_tests6/moveCopySheet.py b/sc/qa/uitest/calc_tests6/moveCopySheet.py
index 5b21e6e86cb0..42aed623edda 100644
--- a/sc/qa/uitest/calc_tests6/moveCopySheet.py
+++ b/sc/qa/uitest/calc_tests6/moveCopySheet.py
@@ -22,7 +22,7 @@ class moveCopySheet(UITestCase):
newName.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"}))
newName.executeAction("TYPE", mkPropertyValues({"TEXT":"newName"}))
#verify, the file has 2 sheets; first one "newName" is selected
- self.assertEqual(document.Sheets.getCount(), 2)
+ self.assertEqual(len(document.Sheets), 2)
# dialog move/copy sheet ; Copy is selected; Select move and -move to end position - ; New Name = moveName
with self.ui_test.execute_dialog_through_command(".uno:Move") as xDialog:
xMoveButton = xDialog.getChild("move")
@@ -38,7 +38,7 @@ class moveCopySheet(UITestCase):
newName.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"}))
newName.executeAction("TYPE", mkPropertyValues({"TEXT":"moveName"}))
# Verify, the file has 2 sheets; first one is "Sheet1" ; second one is "moveName"
- self.assertEqual(document.Sheets.getCount(), 2)
+ self.assertEqual(len(document.Sheets), 2)
self.assertEqual(document.Sheets[0].Name, "Sheet1")
self.assertEqual(document.Sheets[1].Name, "moveName")
@@ -47,7 +47,7 @@ class moveCopySheet(UITestCase):
with self.ui_test.execute_dialog_through_command(".uno:Move", close_button="cancel"):
pass
- self.assertEqual(document.Sheets.getCount(), 2)
+ self.assertEqual(len(document.Sheets), 2)
self.assertEqual(document.Sheets[0].Name, "Sheet1")
self.assertEqual(document.Sheets[1].Name, "moveName")
@@ -60,7 +60,7 @@ class moveCopySheet(UITestCase):
self.assertEqual(get_state_as_dict(newName)["Text"], sheetName)
- self.assertEqual(document.Sheets.getCount(), 3)
+ self.assertEqual(len(document.Sheets), 3)
self.assertEqual(document.Sheets[0].Name, sheetName)
self.assertEqual(document.Sheets[1].Name, "Sheet1")
self.assertEqual(document.Sheets[2].Name, "moveName")