uitest/mass-testing/calc.py | 1 - uitest/mass-testing/impress.py | 7 ++----- uitest/mass-testing/run.py | 2 +- uitest/mass-testing/writer.py | 5 ++--- 4 files changed, 5 insertions(+), 10 deletions(-)
New commits: commit 84d578554adbb85166ac9b1413656ce756236704 Author: Ilmari Lauhakangas <ilmari.lauhakan...@libreoffice.org> AuthorDate: Thu Jul 18 19:33:44 2024 +0300 Commit: Ilmari Lauhakangas <ilmari.lauhakan...@libreoffice.org> CommitDate: Thu Jul 18 18:34:51 2024 +0200 uitest: fix issues found by Ruff linter Change-Id: I6a0c9ea90ec6423ed27f525e14ffd8d4b6b8495c Reviewed-on: https://gerrit.libreoffice.org/c/dev-tools/+/170700 Tested-by: Ilmari Lauhakangas <ilmari.lauhakan...@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakan...@libreoffice.org> diff --git a/uitest/mass-testing/calc.py b/uitest/mass-testing/calc.py index 8b9f3bbc..597b9774 100755 --- a/uitest/mass-testing/calc.py +++ b/uitest/mass-testing/calc.py @@ -5,7 +5,6 @@ # import os -import signal from uitest.framework import UITestCase from uitest.uihelper.common import get_state_as_dict from libreoffice.uno.propertyvalue import mkPropertyValues diff --git a/uitest/mass-testing/impress.py b/uitest/mass-testing/impress.py index a885d0a7..dbe12ada 100755 --- a/uitest/mass-testing/impress.py +++ b/uitest/mass-testing/impress.py @@ -40,7 +40,7 @@ class massTesting(UITestCase): yield xEdit def test_copy_all_paste_undo(self): - with self.load_file() as xEdit: + with self.load_file(): self.xUITest.executeCommand(".uno:SelectAll") self.xUITest.executeCommand(".uno:Copy") @@ -66,13 +66,10 @@ class massTesting(UITestCase): self.xUITest.executeCommand(".uno:Undo") def test_duplicate_all_slides_and_undo(self): - with self.load_file() as xEdit: + with self.load_file(): # Go to the slide sorter view self.xUITest.executeCommand(".uno:DiaMode") - xDoc = self.xUITest.getTopFocusWindow() - xEdit = xDoc.getChild("slidesorter") - self.xUITest.executeCommand(".uno:SelectAll") self.xUITest.executeCommand(".uno:DuplicatePage") diff --git a/uitest/mass-testing/run.py b/uitest/mass-testing/run.py index d1bec88b..f829b0d6 100755 --- a/uitest/mass-testing/run.py +++ b/uitest/mass-testing/run.py @@ -9,7 +9,7 @@ import os import argparse import glob import shutil -from subprocess import Popen, PIPE, TimeoutExpired +from subprocess import Popen, PIPE import sys import signal import logging diff --git a/uitest/mass-testing/writer.py b/uitest/mass-testing/writer.py index 83ead784..a88933c7 100755 --- a/uitest/mass-testing/writer.py +++ b/uitest/mass-testing/writer.py @@ -5,7 +5,6 @@ # import os -import signal from uitest.framework import UITestCase from libreoffice.uno.propertyvalue import mkPropertyValues from contextlib import contextmanager @@ -54,7 +53,7 @@ class massTesting(UITestCase): self.xUITest.executeCommand(".uno:Undo") def test_insert_pageBreaks_and_undo(self): - with self.load_file() as xEdit: + with self.load_file(): for i in range(5): self.xUITest.executeCommand(".uno:InsertPagebreak") @@ -62,7 +61,7 @@ class massTesting(UITestCase): self.xUITest.executeCommand(".uno:Undo") def test_copy_all_paste_undo(self): - with self.load_file() as xEdit: + with self.load_file(): self.xUITest.executeCommand(".uno:SelectAll") self.xUITest.executeCommand(".uno:SelectAll") self.xUITest.executeCommand(".uno:SelectAll")