uitest/test_main.py | 2 +- uitest/writer_tests/customizeDialog.py | 4 ++-- uitest/writer_tests/start.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)
New commits: commit c0e720bfd209b50ca7dc2082e340f9b6288a6216 Author: Jens Carl <j.car...@gmx.de> AuthorDate: Sun Nov 17 10:55:29 2019 -0800 Commit: Muhammet Kara <muhammet.k...@collabora.com> CommitDate: Mon Nov 18 13:35:44 2019 +0100 Fix 'is' operator for comparison The 'is' operator should not be used for comparison on some types of literals. In CPython this works by accident and CPython 3.8 introduced a SyntaxWarning (see https://bugs.python.org/issue34850). Change-Id: Ic4ba481579d13fd1496431ded59dd626a05fc0c6 Reviewed-on: https://gerrit.libreoffice.org/83033 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.k...@collabora.com> diff --git a/uitest/test_main.py b/uitest/test_main.py index 851a44f8e929..ab173c32476c 100644 --- a/uitest/test_main.py +++ b/uitest/test_main.py @@ -54,7 +54,7 @@ def find_test_files(dir_path): # ignore the __init__.py file # it is obviously not a test file - if f is "__init__.py": + if f == "__init__.py": continue valid_files.append(file_path) diff --git a/uitest/writer_tests/customizeDialog.py b/uitest/writer_tests/customizeDialog.py index 9d2311eb46a6..fa187c36ac35 100644 --- a/uitest/writer_tests/customizeDialog.py +++ b/uitest/writer_tests/customizeDialog.py @@ -34,7 +34,7 @@ class ConfigureDialog(UITestCase): xSearch = xDialog.getChild("searchEntry") initialEntryCount = get_state_as_dict(xfunc)["Children"] - self.assertTrue(initialEntryCount is not 0) + self.assertTrue(initialEntryCount != 0) xSearch.executeAction("SET", mkPropertyValues({"TEXT":"format"})) @@ -67,7 +67,7 @@ class ConfigureDialog(UITestCase): xCategory = xDialog.getChild("commandcategorylist") initialEntryCount = get_state_as_dict(xFunc)["Children"] - self.assertTrue(initialEntryCount is not 0) + self.assertTrue(initialEntryCount != 0) select_pos(xCategory, "1") filteredEntryCount = get_state_as_dict(xFunc)["Children"] diff --git a/uitest/writer_tests/start.py b/uitest/writer_tests/start.py index c8cbcbba4884..5851e8eff7c9 100644 --- a/uitest/writer_tests/start.py +++ b/uitest/writer_tests/start.py @@ -45,7 +45,7 @@ class SimpleWriterTest(UITestCase): xWriterEdit = xWriterDoc.getChild("writer_edit") state = get_state_as_dict(xWriterEdit) - while state["CurrentPage"] is "1": + while state["CurrentPage"] == "1": xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "RETURN"})) state = get_state_as_dict(xWriterEdit) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits