summaryrefslogtreecommitdiff
path: root/pyuno
diff options
context:
space:
mode:
authorChenxiong Qi <qcxhome@gmail.com>2023-12-20 20:54:05 +0800
committerHossein <hossein@libreoffice.org>2024-01-23 14:00:46 +0100
commit74de0ebb810f3e13c45f01c63067cb8de794ce3c (patch)
treeb5f069ad74d12b5ce095b4ad9159861fd1445614 /pyuno
parent3a20c691ab1d6a16ad0fc144926b22c098552be4 (diff)
tdf#97361 Make unittests more pythonic: XIndexAccess
Change-Id: I05ef274dd0ad5dc35b5455cfc01feabc6c0820a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161276 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
Diffstat (limited to 'pyuno')
-rw-r--r--pyuno/qa/pytests/testcollections_XIndexContainer.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/pyuno/qa/pytests/testcollections_XIndexContainer.py b/pyuno/qa/pytests/testcollections_XIndexContainer.py
index 1df5f07740cb..45cf509889a4 100644
--- a/pyuno/qa/pytests/testcollections_XIndexContainer.py
+++ b/pyuno/qa/pytests/testcollections_XIndexContainer.py
@@ -64,8 +64,8 @@ class TestXIndexContainer(CollectionsTestBase):
else:
# expected is list
self.assertEqual(None, captured)
- self.assertEqual(len(expected), property_values.getCount())
- for i in range(property_values.getCount()):
+ self.assertEqual(len(expected), len(property_values))
+ for i in range(len(property_values)):
self.assertEqual(to_compare[i][0].Name, property_values[i][0].Name)
def deleteValuesTestFixture(self, count, key, expected):
@@ -89,8 +89,8 @@ class TestXIndexContainer(CollectionsTestBase):
else:
# expected is list
self.assertEqual(None, captured)
- self.assertEqual(len(expected), property_values.getCount())
- for i in range(property_values.getCount()):
+ self.assertEqual(len(expected), len(property_values))
+ for i in range(len(property_values)):
self.assertEqual(to_compare[i][0].Name, property_values[i][0].Name)
# Tests syntax: