summaryrefslogtreecommitdiffstats
path: root/pyuno/qa/pytests/testcollections_XIndexReplace.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyuno/qa/pytests/testcollections_XIndexReplace.py')
-rw-r--r--pyuno/qa/pytests/testcollections_XIndexReplace.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/pyuno/qa/pytests/testcollections_XIndexReplace.py b/pyuno/qa/pytests/testcollections_XIndexReplace.py
index 45d1cc075f33..bbf424f0bdfb 100644
--- a/pyuno/qa/pytests/testcollections_XIndexReplace.py
+++ b/pyuno/qa/pytests/testcollections_XIndexReplace.py
@@ -78,6 +78,8 @@ class TestXIndexReplace(CollectionsTestBase):
# Then
self.assertEqual(('Caption',), index.LevelParagraphStyles[0])
+ doc.close(True)
+
# Tests syntax:
# obj[0] = val # Replace by index
# For:
@@ -91,6 +93,8 @@ class TestXIndexReplace(CollectionsTestBase):
with self.assertRaises(TypeError):
index.LevelParagraphStyles[0] = None
+ doc.close(True)
+
# Tests syntax:
# obj[0] = val # Replace by index
# For:
@@ -104,6 +108,8 @@ class TestXIndexReplace(CollectionsTestBase):
with self.assertRaises(TypeError):
index.LevelParagraphStyles[0] = 'foo'
+ doc.close(True)
+
# Tests syntax:
# obj[0] = val # Replace by index
# For:
@@ -117,6 +123,8 @@ class TestXIndexReplace(CollectionsTestBase):
with self.assertRaises(TypeError):
index.LevelParagraphStyles[0] = 12.34
+ doc.close(True)
+
# Tests syntax:
# obj[0] = val # Replace by index
# For:
@@ -130,6 +138,8 @@ class TestXIndexReplace(CollectionsTestBase):
with self.assertRaises(TypeError):
index.LevelParagraphStyles[0] = [0, 1]
+ doc.close(True)
+
# Tests syntax:
# obj[0] = val # Replace by index
# For:
@@ -143,6 +153,8 @@ class TestXIndexReplace(CollectionsTestBase):
with self.assertRaises(TypeError):
index.LevelParagraphStyles[0] = {'a': 'b'}
+ doc.close(True)
+
# Tests syntax:
# obj[0] = val # Replace by index
# For:
@@ -156,6 +168,8 @@ class TestXIndexReplace(CollectionsTestBase):
with self.assertRaises(TypeError):
index.LevelParagraphStyles[0] = ('Caption', ())
+ doc.close(True)
+
# Tests syntax:
# obj[2:4] = val1,val2 # Replace by slice
# For:
@@ -177,6 +191,7 @@ class TestXIndexReplace(CollectionsTestBase):
if (len(expected) != 10):
expected = ValueError()
self.assignValuesTestFixture(doc, key, assign, expected)
+ doc.close(True)
# Tests syntax:
# obj[2:4] = val1,val2 # Replace by slice
@@ -194,6 +209,8 @@ class TestXIndexReplace(CollectionsTestBase):
12.34
)
+ doc.close(True)
+
# Tests syntax:
# obj[0:3:2] = val1,val2 # Replace by extended slice
# For:
@@ -214,6 +231,7 @@ class TestXIndexReplace(CollectionsTestBase):
except Exception as e:
expected = e
self.assignValuesTestFixture(doc, key, assign, expected)
+ doc.close(True)
if __name__ == '__main__':