diff options
author | Saurav Chirania <saurav.chir@gmail.com> | 2018-02-13 15:20:46 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2018-02-26 19:40:01 +0100 |
commit | 8e1bb35eeb332d7cb8e4aafb47b57a0ffd7de044 (patch) | |
tree | b8323b63929d0abeb2f03db02803e9ac889ffe69 /sw | |
parent | 6f425be1c1407a2b7db10693dbfa7c0a4503bb38 (diff) |
Revert "tdf#97361 Tests in sw should be more pythonic"
This reverts unnecessary changes in
commit 4469c1d4061e8cb463469e60e5d87af5f9bf9636
as suggested in comments at-
https://gerrit.libreoffice.org/#/c/49163/
Change-Id: Iad5da22624d7c543177a2271abb58bc4f6f31ecd
Reviewed-on: https://gerrit.libreoffice.org/49660
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/python/check_table.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/sw/qa/python/check_table.py b/sw/qa/python/check_table.py index 47389fdeef08..35da08fe8195 100644 --- a/sw/qa/python/check_table.py +++ b/sw/qa/python/check_table.py @@ -310,11 +310,11 @@ class CheckTable(unittest.TestCase): xTable.ChartColumnAsLabel = False xTable.ChartRowAsLabel = False # roundtrip - xTable.Data = ((y for y in range(3*x+1,3*x+4)) for x in range(4)) + xTable.Data = ((1, 2, 3), (4, 5, 6), (7, 8, 9), (10, 11, 12)) self.assertEqual(xTable.Data, ((1, 2, 3), (4, 5, 6), (7, 8, 9), (10, 11, 12))) # missing row with self.assertRaises(Exception): - xTable.Data = ((y for y in range(3*x+1,3*x+4)) for x in range(3)) + xTable.Data = ((1, 2, 3), (4, 5, 6), (7, 8, 9)) # missing column with self.assertRaises(Exception): xTable.Data = ((1, 2), (4, 5), (7, 8), (10, 11)) @@ -342,7 +342,7 @@ class CheckTable(unittest.TestCase): xDoc.Text.insertTextContent(xCursor, xTable, False) xTable.ChartColumnAsLabel = False xTable.ChartRowAsLabel = False - xTable.Data = ((y for y in range(3*x+1,3*x+4)) for x in range(4)) + xTable.Data = ((1, 2, 3), (4, 5, 6), (7, 8, 9), (10, 11, 12)) xRows = xTable.Rows self.assertEqual(xRows.ImplementationName, 'SwXTableRows') self.assertTrue(xRows.supportsService('com.sun.star.text.TableRows')) @@ -369,7 +369,7 @@ class CheckTable(unittest.TestCase): xDoc.Text.insertTextContent(xCursor, xTable, False) xTable.ChartColumnAsLabel = False xTable.ChartRowAsLabel = False - xTable.Data = ((y for y in range(3*x+1,3*x+4)) for x in range(4)) + xTable.Data = ((1, 2, 3), (4, 5, 6), (7, 8, 9), (10, 11, 12)) xRows = xTable.Rows xRows.insertByIndex(1, 2) nan = float('nan') @@ -411,7 +411,7 @@ class CheckTable(unittest.TestCase): xDoc.Text.insertTextContent(xCursor, xTable, False) xTable.ChartColumnAsLabel = False xTable.ChartRowAsLabel = False - xTable.Data = ((y for y in range(3*x+1,3*x+4)) for x in range(4)) + xTable.Data = ((1, 2, 3), (4, 5, 6), (7, 8, 9), (10, 11, 12)) self.assertTrue(xTable.Name == 'Table1') self.assertIn('com.sun.star.text.GenericTextDocument', xDoc.SupportedServiceNames) xChartdataprovider = xDoc.createInstance('com.sun.star.chart2.data.DataProvider') @@ -568,7 +568,8 @@ class CheckTable(unittest.TestCase): xDoc.Text.insertTextContent(xCursor, xTable, False) xTable.ChartColumnAsLabel = False xTable.ChartRowAsLabel = False - xTable.Data = ((y for y in range(3*x+1,3*x+4)) for x in range(4)) + xTable.Data = ((1, 2, 3), (4, 5, 6), (7, 8, 9), (10, 11, 12)) + xChartDataProvider = xDoc.createInstance('com.sun.star.chart2.data.DataProvider') self.assertEqual('', xChartDataProvider.convertRangeToXML('')) @@ -607,7 +608,7 @@ class CheckTable(unittest.TestCase): xText = xDoc.getText() xCursor = xText.createTextCursor() xText.insertTextContent(xCursor, xTable, False) - xTable.Data = ((y for y in range(3*x+1,3*x+4)) for x in range(3)) + xTable.Data = ((1, 2, 3), (4, 5, 6), (7, 8, 9)) xCursor = xTable.createCursorByCellName("A1") xCursor.goDown(1, True) xCursor.mergeRange() |