summaryrefslogtreecommitdiff
path: root/sw/qa/python
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/python')
-rw-r--r--sw/qa/python/check_styles.py4
-rw-r--r--sw/qa/python/xtextrange.py6
2 files changed, 5 insertions, 5 deletions
diff --git a/sw/qa/python/check_styles.py b/sw/qa/python/check_styles.py
index aca3d8f0486e..59e9637d56a9 100644
--- a/sw/qa/python/check_styles.py
+++ b/sw/qa/python/check_styles.py
@@ -62,8 +62,8 @@ class CheckStyle(unittest.TestCase):
with self.assertRaises(NoSuchElementException):
xFamily.getByName("foobarbaz")
- with self.assertRaises(IndexOutOfBoundsException):
- xFamily.getByIndex(-1)
+ with self.assertRaises(IndexError):
+ xFamily[len(xFamily) + 1]
for sStylename in xFamily.ElementNames:
self.assertTrue(xFamily.hasByName(sStylename))
diff --git a/sw/qa/python/xtextrange.py b/sw/qa/python/xtextrange.py
index 583cabc30aba..a0b7925b9ff9 100644
--- a/sw/qa/python/xtextrange.py
+++ b/sw/qa/python/xtextrange.py
@@ -91,11 +91,11 @@ class TestXTextRange(unittest.TestCase):
def test_textRangesCompare(self):
doc = self._uno.getDoc()
# Bookmark in body text
- bookmark1 = doc.getBookmarks().getByIndex(0).getAnchor()
+ bookmark1 = doc.getBookmarks()[0].getAnchor()
# Bookmarks in table
- bookmark2 = doc.getBookmarks().getByIndex(1).getAnchor()
- bookmark3 = doc.getBookmarks().getByIndex(2).getAnchor()
+ bookmark2 = doc.getBookmarks()[1].getAnchor()
+ bookmark3 = doc.getBookmarks()[2].getAnchor()
res = doc.Text.compareRegionStarts(bookmark1, bookmark2)
self.assertEqual(res, 1)