diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-04-07 10:31:13 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-04-07 18:20:17 +0200 |
commit | bd78ce123cd65fb8d0843df1d2530a168d5d464d (patch) | |
tree | e0f72c7b9ca1b3d54fc5a0917bf23aca5d10282f /sw/qa | |
parent | 54209acb41b25422ce708da3a2aa33d124d3053c (diff) |
uitest: remove duplicated code
Change-Id: I86a4cd75e103445a288ad52a8c2167fa5b20c794
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113720
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/uitest/writer_tests4/tdf138546.py | 6 | ||||
-rw-r--r-- | sw/qa/uitest/writer_tests7/tdf137803.py | 8 | ||||
-rw-r--r-- | sw/qa/uitest/writer_tests7/tdf140117.py | 8 | ||||
-rw-r--r-- | sw/qa/uitest/writer_tests7/tdf141158.py | 8 | ||||
-rw-r--r-- | sw/qa/uitest/writer_tests7/tdf46561.py | 7 |
5 files changed, 6 insertions, 31 deletions
diff --git a/sw/qa/uitest/writer_tests4/tdf138546.py b/sw/qa/uitest/writer_tests4/tdf138546.py index c94f7eed3d48..0513d8c7600c 100644 --- a/sw/qa/uitest/writer_tests4/tdf138546.py +++ b/sw/qa/uitest/writer_tests4/tdf138546.py @@ -8,10 +8,8 @@ from uitest.framework import UITestCase from uitest.uihelper.common import change_measurement_unit from uitest.uihelper.common import get_state_as_dict, type_text from uitest.uihelper.common import select_pos -import org.libreoffice.unotest -import pathlib -def get_url_for_data_file(file_name): - return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() +from uitest.uihelper.common import get_url_for_data_file + class tdf138546(UITestCase): def test_tdf138546(self): self.ui_test.load_file(get_url_for_data_file("tdf138546.odt")) diff --git a/sw/qa/uitest/writer_tests7/tdf137803.py b/sw/qa/uitest/writer_tests7/tdf137803.py index 2c3f0fcb3713..d3eef57ead81 100644 --- a/sw/qa/uitest/writer_tests7/tdf137803.py +++ b/sw/qa/uitest/writer_tests7/tdf137803.py @@ -7,13 +7,7 @@ from uitest.framework import UITestCase from libreoffice.uno.propertyvalue import mkPropertyValues from uitest.uihelper.common import get_state_as_dict -import importlib -import time -import org.libreoffice.unotest -import pathlib - -def get_url_for_data_file(file_name): - return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() +from uitest.uihelper.common import get_url_for_data_file class tdf137803(UITestCase): def test_tdf137803(self): diff --git a/sw/qa/uitest/writer_tests7/tdf140117.py b/sw/qa/uitest/writer_tests7/tdf140117.py index c86d11091364..58db4c4caf79 100644 --- a/sw/qa/uitest/writer_tests7/tdf140117.py +++ b/sw/qa/uitest/writer_tests7/tdf140117.py @@ -9,13 +9,7 @@ from libreoffice.uno.propertyvalue import mkPropertyValues from uitest.uihelper.common import get_state_as_dict from uitest.uihelper.common import select_pos from uitest.uihelper.common import type_text -import importlib -import time -import org.libreoffice.unotest -import pathlib - -def get_url_for_data_file(file_name): - return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() +from uitest.uihelper.common import get_url_for_data_file class tdf140117(UITestCase): def test_tdf140117(self): diff --git a/sw/qa/uitest/writer_tests7/tdf141158.py b/sw/qa/uitest/writer_tests7/tdf141158.py index 906035e37e89..e29c36418958 100644 --- a/sw/qa/uitest/writer_tests7/tdf141158.py +++ b/sw/qa/uitest/writer_tests7/tdf141158.py @@ -3,16 +3,10 @@ from uitest.framework import UITestCase from libreoffice.uno.propertyvalue import mkPropertyValues from uitest.uihelper.common import get_state_as_dict -import importlib -import pathlib -import org.libreoffice.unotest from uitest.uihelper.common import select_pos +from uitest.uihelper.common import get_url_for_data_file import time -def get_url_for_data_file(file_name): - return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() - - class TestTdf141158(UITestCase): def test_tdf141158(self): # load the desired bugdoc diff --git a/sw/qa/uitest/writer_tests7/tdf46561.py b/sw/qa/uitest/writer_tests7/tdf46561.py index 235136524903..1c90dc3c404a 100644 --- a/sw/qa/uitest/writer_tests7/tdf46561.py +++ b/sw/qa/uitest/writer_tests7/tdf46561.py @@ -8,12 +8,7 @@ from uitest.framework import UITestCase from libreoffice.uno.propertyvalue import mkPropertyValues from uitest.uihelper.common import select_pos from uitest.uihelper.common import type_text -import importlib -import org.libreoffice.unotest -import pathlib - -def get_url_for_data_file(file_name): - return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() +from uitest.uihelper.common import get_url_for_data_file class tdf46561(UITestCase): def check_header_texts(self, master="", first="", left="", right=""): |