sd/qa/uitest/impress_tests/autocorrectOptions.py | 1 - sd/qa/uitest/impress_tests/customSlideShow.py | 14 ++------------ sd/qa/uitest/impress_tests/slideShowSettings.py | 4 +--- sd/qa/uitest/impress_tests/tdf152295.py | 2 +- sd/qa/uitest/impress_tests/tdf155863.py | 2 +- sd/qa/uitest/impress_tests/tdf159927_dateTime.py | 2 +- sd/qa/uitest/impress_tests2/tdf128787.py | 2 +- 7 files changed, 7 insertions(+), 20 deletions(-)
New commits: commit c371b9a708fb1dd1fc0b6d9359bc41685eb26d61 Author: Ilmari Lauhakangas <[email protected]> AuthorDate: Sun Jul 28 09:01:08 2024 +0300 Commit: Ilmari Lauhakangas <[email protected]> CommitDate: Sun Jul 28 10:41:40 2024 +0200 sd: fix issues found by Ruff linter Change-Id: I96dae5eca3bb493500ca1145e141371a5572e29e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171134 Reviewed-by: Ilmari Lauhakangas <[email protected]> Tested-by: Jenkins Tested-by: Ilmari Lauhakangas <[email protected]> diff --git a/sd/qa/uitest/impress_tests/autocorrectOptions.py b/sd/qa/uitest/impress_tests/autocorrectOptions.py index 2f4b7645e30c..25c6215b690e 100644 --- a/sd/qa/uitest/impress_tests/autocorrectOptions.py +++ b/sd/qa/uitest/impress_tests/autocorrectOptions.py @@ -29,7 +29,6 @@ class autocorrectOptions(UITestCase): xnew = xDialog.getChild("new") xdelete = xDialog.getChild("delete") xtabview = xDialog.getChild("tabview") - xreset = xDialog.getChild("reset") nrRows = get_state_as_dict(xtabview)["VisibleCount"] self.assertTrue(int(nrRows) > 0) diff --git a/sd/qa/uitest/impress_tests/customSlideShow.py b/sd/qa/uitest/impress_tests/customSlideShow.py index f070a1ca1cda..f8a75e08527f 100644 --- a/sd/qa/uitest/impress_tests/customSlideShow.py +++ b/sd/qa/uitest/impress_tests/customSlideShow.py @@ -9,14 +9,11 @@ from uitest.framework import UITestCase from libreoffice.uno.propertyvalue import mkPropertyValues -import importlib -from uitest.uihelper.common import select_pos -from uitest.uihelper.common import get_state_as_dict, type_text +from uitest.uihelper.common import get_state_as_dict class customSlideShow(UITestCase): def test_customSlideShow(self): with self.ui_test.create_doc_in_start_center("impress"): - MainWindow = self.xUITest.getTopFocusWindow() TemplateDialog = self.xUITest.getTopFocusWindow() cancel = TemplateDialog.getChild("close") self.ui_test.close_dialog_through_button(cancel) @@ -45,29 +42,22 @@ class customSlideShow(UITestCase): self.assertEqual(get_state_as_dict(customname)["Text"], "aa") custompages = DefineCustomSlideShow.getChild("custompages") pages = DefineCustomSlideShow.getChild("pages") - remove = DefineCustomSlideShow.getChild("remove") self.assertEqual(get_state_as_dict(custompages)["Children"], "1") self.assertEqual(get_state_as_dict(pages)["Children"], "1") xEntry = custompages.getChild("0") xEntry.executeAction("SELECT", tuple()) -# remove.executeAction("CLICK",tuple()) #tdf126951 self.assertEqual(get_state_as_dict(custompages)["Children"], "1") self.assertEqual(get_state_as_dict(pages)["Children"], "1") - delete = CustomSlideShows.getChild("delete") customshowlist = CustomSlideShows.getChild("customshowlist") self.assertEqual(get_state_as_dict(customshowlist)["Children"], "1") -# delete.executeAction("CLICK",tuple()) -# self.assertEqual(get_state_as_dict(customshowlist)["Children"], "0") - def test_tdf143125(self): with self.ui_test.create_doc_in_start_center("impress"): - MainWindow = self.xUITest.getTopFocusWindow() TemplateDialog = self.xUITest.getTopFocusWindow() cancel = TemplateDialog.getChild("close") self.ui_test.close_dialog_through_button(cancel) - with self.ui_test.execute_dialog_through_command(".uno:CustomShowDialog") as CustomSlideShows: + with self.ui_test.execute_dialog_through_command(".uno:CustomShowDialog"): # Without the fix in place, this test would have crashed here pass diff --git a/sd/qa/uitest/impress_tests/slideShowSettings.py b/sd/qa/uitest/impress_tests/slideShowSettings.py index 16fbdc8405c9..0750d462bbba 100644 --- a/sd/qa/uitest/impress_tests/slideShowSettings.py +++ b/sd/qa/uitest/impress_tests/slideShowSettings.py @@ -8,13 +8,11 @@ # from uitest.framework import UITestCase -from libreoffice.uno.propertyvalue import mkPropertyValues -from uitest.uihelper.common import get_state_as_dict, type_text, select_pos +from uitest.uihelper.common import get_state_as_dict, select_pos class slideShowSettings(UITestCase): def test_slideShowSettings(self): with self.ui_test.create_doc_in_start_center("impress"): - MainWindow = self.xUITest.getTopFocusWindow() TemplateDialog = self.xUITest.getTopFocusWindow() cancel = TemplateDialog.getChild("close") self.ui_test.close_dialog_through_button(cancel) diff --git a/sd/qa/uitest/impress_tests/tdf152295.py b/sd/qa/uitest/impress_tests/tdf152295.py index 9c0b00719bb7..87836ede5172 100644 --- a/sd/qa/uitest/impress_tests/tdf152295.py +++ b/sd/qa/uitest/impress_tests/tdf152295.py @@ -13,7 +13,7 @@ from uitest.uihelper.common import change_measurement_unit class tdf152295(UITestCase): def test_tdf152295(self): - with self.ui_test.create_doc_in_start_center("impress") as document: + with self.ui_test.create_doc_in_start_center("impress"): TemplateDialog = self.xUITest.getTopFocusWindow() close = TemplateDialog.getChild("close") self.ui_test.close_dialog_through_button(close) diff --git a/sd/qa/uitest/impress_tests/tdf155863.py b/sd/qa/uitest/impress_tests/tdf155863.py index 79fd3be9750e..d8ca48e9b3f6 100644 --- a/sd/qa/uitest/impress_tests/tdf155863.py +++ b/sd/qa/uitest/impress_tests/tdf155863.py @@ -9,7 +9,7 @@ from uitest.framework import UITestCase from libreoffice.uno.propertyvalue import mkPropertyValues -from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file +from uitest.uihelper.common import get_url_for_data_file class tdf155863(UITestCase): def test_tdf155863(self): diff --git a/sd/qa/uitest/impress_tests/tdf159927_dateTime.py b/sd/qa/uitest/impress_tests/tdf159927_dateTime.py index 17c5f23caa3b..273cb3446c5b 100644 --- a/sd/qa/uitest/impress_tests/tdf159927_dateTime.py +++ b/sd/qa/uitest/impress_tests/tdf159927_dateTime.py @@ -13,7 +13,7 @@ from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file class tdf159927(UITestCase): def test_tdf159927(self): - with self.ui_test.load_file(get_url_for_data_file("tdf159927_dateTime.odp")) as document: + with self.ui_test.load_file(get_url_for_data_file("tdf159927_dateTime.odp")): with self.ui_test.execute_dialog_through_command(".uno:HeaderAndFooter", close_button="cancel") as xDialog: language_list = xDialog.getChild("language_list") diff --git a/sd/qa/uitest/impress_tests2/tdf128787.py b/sd/qa/uitest/impress_tests2/tdf128787.py index 78cb03c367d4..900b724317cf 100644 --- a/sd/qa/uitest/impress_tests2/tdf128787.py +++ b/sd/qa/uitest/impress_tests2/tdf128787.py @@ -14,7 +14,7 @@ from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file, sel class tdf128787(UITestCase): def test_tdf128787(self): - with self.ui_test.load_file(get_url_for_data_file("tdf128787.odp")) as document: + with self.ui_test.load_file(get_url_for_data_file("tdf128787.odp")): xImpressDoc = self.xUITest.getTopFocusWindow() xEditWin = xImpressDoc.getChild("impress_win")
