diff options
author | tagezi <lera.goncharuk@gmail.com> | 2022-05-27 13:00:39 +0300 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-05-30 09:48:46 +0200 |
commit | c3baf2a7f48b5ee46c6792b3106cb4fedb4a2ad2 (patch) | |
tree | ba3e8c1fcdf65307d892d4420f413b8770859c89 /sc/qa/uitest/calc_tests7 | |
parent | 507a8871c25aa9b7e5a02ceb86f5c60ebccc722b (diff) |
sc uitests: Cleaning up unused variables
Removed unused variables in the 'with' statement as the syntax
allows the statement to be used without a variable.
Removed variables like 'xcomments' and 'xseedspin', which seem
to have been copied and not cleaned up.
Removed variables 'gridwin' and 'xCalcDoc' if 'gridwin' is not used.
Change-Id: Ia97692a0fb2e2af1d2693e09ac8f7c614360ade8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135042
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc/qa/uitest/calc_tests7')
-rw-r--r-- | sc/qa/uitest/calc_tests7/tdf106667.py | 2 | ||||
-rw-r--r-- | sc/qa/uitest/calc_tests7/tdf122509.py | 6 | ||||
-rw-r--r-- | sc/qa/uitest/calc_tests7/tdf123122.py | 13 | ||||
-rw-r--r-- | sc/qa/uitest/calc_tests7/tdf124896.py | 5 | ||||
-rw-r--r-- | sc/qa/uitest/calc_tests7/tdf137397.py | 2 |
5 files changed, 3 insertions, 25 deletions
diff --git a/sc/qa/uitest/calc_tests7/tdf106667.py b/sc/qa/uitest/calc_tests7/tdf106667.py index 2de330ed615d..8d3c4599ce9b 100644 --- a/sc/qa/uitest/calc_tests7/tdf106667.py +++ b/sc/qa/uitest/calc_tests7/tdf106667.py @@ -26,7 +26,7 @@ class tdf106667(UITestCase): self.xUITest.executeCommand(".uno:SelectAll") - with self.ui_test.execute_dialog_through_command(".uno:About", close_button="btnClose") as xAboutDlg: + with self.ui_test.execute_dialog_through_command(".uno:About", close_button="btnClose"): pass self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "A") diff --git a/sc/qa/uitest/calc_tests7/tdf122509.py b/sc/qa/uitest/calc_tests7/tdf122509.py index ed5d2b03ff9b..c0d9f5a2a982 100644 --- a/sc/qa/uitest/calc_tests7/tdf122509.py +++ b/sc/qa/uitest/calc_tests7/tdf122509.py @@ -26,13 +26,7 @@ class tdf122509(UITestCase): with self.ui_test.execute_dialog_through_command(".uno:FormatCellDialog") as xDialog: xTabs = xDialog.getChild("tabcontrol") select_pos(xTabs, "0") #tab Numbers - xliststore1 = xDialog.getChild("categorylb") #1st list / Category - xliststore2 = xDialog.getChild("formatlb") #2nd list / Format - xdecimalsed = xDialog.getChild("decimalsed") - xleadzerosed = xDialog.getChild("leadzerosed") xnegnumred = xDialog.getChild("negnumred") - xthousands = xDialog.getChild("thousands") - xlanguagelb = xDialog.getChild("languagelb") xformatted = xDialog.getChild("formatted") self.assertEqual(get_state_as_dict(xformatted)["Text"], "#,##0.00 [$USD];[RED]-#,##0.00 [$USD]") diff --git a/sc/qa/uitest/calc_tests7/tdf123122.py b/sc/qa/uitest/calc_tests7/tdf123122.py index c4e7ef256bee..8d1d6daebcc7 100644 --- a/sc/qa/uitest/calc_tests7/tdf123122.py +++ b/sc/qa/uitest/calc_tests7/tdf123122.py @@ -25,13 +25,6 @@ class tdf123122(UITestCase): with self.ui_test.execute_dialog_through_command(".uno:FormatCellDialog") as xDialog: xTabs = xDialog.getChild("tabcontrol") select_pos(xTabs, "0") #tab Numbers - xliststore1 = xDialog.getChild("categorylb") #1st list / Category - xliststore2 = xDialog.getChild("formatlb") #2nd list / Format - xdecimalsed = xDialog.getChild("decimalsed") - xleadzerosed = xDialog.getChild("leadzerosed") - xnegnumred = xDialog.getChild("negnumred") - xthousands = xDialog.getChild("thousands") - xlanguagelb = xDialog.getChild("languagelb") xformatted = xDialog.getChild("formatted") #Format cells and enter NN MMM DD YYYY HH:MM as format code @@ -46,12 +39,6 @@ class tdf123122(UITestCase): xTabs = xDialog.getChild("tabcontrol") select_pos(xTabs, "0") #tab Numbers xliststore1 = xDialog.getChild("categorylb") #1st list / Category - xliststore2 = xDialog.getChild("formatlb") #2nd list / Format - xdecimalsed = xDialog.getChild("decimalsed") - xleadzerosed = xDialog.getChild("leadzerosed") - xnegnumred = xDialog.getChild("negnumred") - xthousands = xDialog.getChild("thousands") - xlanguagelb = xDialog.getChild("languagelb") xformatted = xDialog.getChild("formatted") diff --git a/sc/qa/uitest/calc_tests7/tdf124896.py b/sc/qa/uitest/calc_tests7/tdf124896.py index 4beeff9baad0..44c6ba4b28a1 100644 --- a/sc/qa/uitest/calc_tests7/tdf124896.py +++ b/sc/qa/uitest/calc_tests7/tdf124896.py @@ -14,11 +14,8 @@ from uitest.uihelper.common import get_url_for_data_file class tdf124896(UITestCase): def test_tdf124896_crash_delete_sheet(self): with self.ui_test.load_file(get_url_for_data_file("tdf124896.ods")) as calc_doc: - xCalcDoc = self.xUITest.getTopFocusWindow() - gridwin = xCalcDoc.getChild("grid_window") - # Remove X Bar R Chart (2) sheet - with self.ui_test.execute_dialog_through_command(".uno:Remove", close_button="yes") as xDialog: + with self.ui_test.execute_dialog_through_command(".uno:Remove", close_button="yes"): pass #verify; no crashes diff --git a/sc/qa/uitest/calc_tests7/tdf137397.py b/sc/qa/uitest/calc_tests7/tdf137397.py index a7141dacf473..c98a706d20ed 100644 --- a/sc/qa/uitest/calc_tests7/tdf137397.py +++ b/sc/qa/uitest/calc_tests7/tdf137397.py @@ -15,7 +15,7 @@ class tdf137397(UITestCase): def test_tdf137397(self): - with self.ui_test.load_file(get_url_for_data_file("tdf137397.ods")) as calc_doc: + with self.ui_test.load_file(get_url_for_data_file("tdf137397.ods")): change_measurement_unit(self, 'Centimeter') |