summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>2024-07-18 19:33:44 +0300
committerIlmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>2024-07-18 18:34:51 +0200
commit84d578554adbb85166ac9b1413656ce756236704 (patch)
treece8969586b8b1d8f1dcb1a54613cd9fbf8ce0481
parent21fc2f5b63d8882f8bec43e91b67e273b75abc12 (diff)
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.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
-rwxr-xr-xuitest/mass-testing/calc.py1
-rwxr-xr-xuitest/mass-testing/impress.py7
-rwxr-xr-xuitest/mass-testing/run.py2
-rwxr-xr-xuitest/mass-testing/writer.py5
4 files changed, 5 insertions, 10 deletions
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")