summaryrefslogtreecommitdiffstats
path: root/uitest/writer_tests
diff options
context:
space:
mode:
authorJens Carl <j.carl43@gmx.de>2019-11-17 10:55:29 -0800
committerMuhammet Kara <muhammet.kara@collabora.com>2019-11-18 13:35:44 +0100
commitc0e720bfd209b50ca7dc2082e340f9b6288a6216 (patch)
tree6632f0e8fa956e4f2a8dcf95421b0fdd16ae9278 /uitest/writer_tests
parentcid#1249470 Uninitialized scalar field (diff)
downloadcore-c0e720bfd209b50ca7dc2082e340f9b6288a6216.tar.gz
core-c0e720bfd209b50ca7dc2082e340f9b6288a6216.zip
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.kara@collabora.com>
Diffstat (limited to 'uitest/writer_tests')
-rw-r--r--uitest/writer_tests/customizeDialog.py4
-rw-r--r--uitest/writer_tests/start.py2
2 files changed, 3 insertions, 3 deletions
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)