diff options
author | kerem <hallackerem@gmail.com> | 2016-12-21 19:59:06 +0200 |
---|---|---|
committer | Björn Michaelsen <bjoern.michaelsen@canonical.com> | 2017-01-03 17:16:33 +0000 |
commit | ceab0bab9275394e8ac20e32a1d7828b4eb1f6ac (patch) | |
tree | 47f58bc3917366e0826242548c622338e111f9f9 /sw/qa | |
parent | c2e69df36464437d70c4396a4bc5932e6a97a0ff (diff) |
tdf#97361: Changed naming in check_fields and check_table
Change-Id: I2a0cf6d6b663e00cd67447089f65512667b18f3a
Reviewed-on: https://gerrit.libreoffice.org/32297
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/python/check_fields.py | 14 | ||||
-rw-r--r-- | sw/qa/python/check_table.py | 44 |
2 files changed, 29 insertions, 29 deletions
diff --git a/sw/qa/python/check_fields.py b/sw/qa/python/check_fields.py index 0d39a9bc620f..257be616ebbe 100644 --- a/sw/qa/python/check_fields.py +++ b/sw/qa/python/check_fields.py @@ -24,9 +24,9 @@ class CheckFields(unittest.TestCase): xField = xFieldEnum.nextElement() if xField.supportsService("com.sun.star.text.TextField.JumpEdit"): xAnchor = xField.getAnchor() - readContent = xAnchor.getString() - self.assertTrue(readContent in placeholders, - "field %s is not contained: " % readContent) + read_content = xAnchor.getString() + self.assertTrue(read_content in placeholders, + "field %s is not contained: " % read_content) def test_fdo42073(self): xDoc = self.__class__._xEmptyDoc @@ -34,12 +34,12 @@ class CheckFields(unittest.TestCase): xCursor = xBodyText.createTextCursor() xTextField = xDoc.createInstance("com.sun.star.text.TextField.Input") xBodyText.insertTextContent(xCursor, xTextField, True) - readContent = xTextField.getPropertyValue("Content") - self.assertEqual("", readContent) + read_content = xTextField.getPropertyValue("Content") + self.assertEqual("", read_content) content = "this is not surprising" xTextField.setPropertyValue("Content", content) - readContent = xTextField.getPropertyValue("Content") - self.assertEqual(content, readContent) + read_content = xTextField.getPropertyValue("Content") + self.assertEqual(content, read_content) if __name__ == '__main__': unittest.main() diff --git a/sw/qa/python/check_table.py b/sw/qa/python/check_table.py index 2b7de595a534..3f9f6b3c475b 100644 --- a/sw/qa/python/check_table.py +++ b/sw/qa/python/check_table.py @@ -35,15 +35,15 @@ class CheckTable(unittest.TestCase): def tearDownClass(cls): cls._uno.tearDown() - def __test_borderAsserts(self, xBorderLine, lineValid): - self.assertTrue(lineValid) + def __test_borderAsserts(self, xBorderLine, line_valid): + self.assertTrue(line_valid) self.assertEqual(0, xBorderLine.InnerLineWidth) self.assertEqual(self.OOLineHairline, xBorderLine.OuterLineWidth) self.assertEqual(0, xBorderLine.LineDistance) self.assertEqual(0, xBorderLine.Color) - def __test_borderAssertsWithLineStyle(self, xBorderLine, lineValid): - self.__test_borderAsserts(xBorderLine, lineValid) + def __test_borderAssertsWithLineStyle(self, xBorderLine, line_valid): + self.__test_borderAsserts(xBorderLine, line_valid) self.assertEqual(self.OOLineHairline, xBorderLine.LineWidth) self.assertEqual(SOLID, xBorderLine.LineStyle) @@ -60,17 +60,17 @@ class CheckTable(unittest.TestCase): xCursor = xText.createTextCursor() xText.insertTextContent(xCursor, xTable, False) - borderDistances = xTable.TableBorderDistances + border_distances = xTable.TableBorderDistances - self.assertEqual(97, borderDistances.TopDistance) - self.assertEqual(97, borderDistances.BottomDistance) - self.assertEqual(97, borderDistances.LeftDistance) - self.assertEqual(97, borderDistances.RightDistance) + self.assertEqual(97, border_distances.TopDistance) + self.assertEqual(97, border_distances.BottomDistance) + self.assertEqual(97, border_distances.LeftDistance) + self.assertEqual(97, border_distances.RightDistance) - self.assertEqual(True, borderDistances.IsTopDistanceValid) - self.assertEqual(True, borderDistances.IsBottomDistanceValid) - self.assertEqual(True, borderDistances.IsLeftDistanceValid) - self.assertEqual(True, borderDistances.IsRightDistanceValid) + self.assertEqual(True, border_distances.IsTopDistanceValid) + self.assertEqual(True, border_distances.IsBottomDistanceValid) + self.assertEqual(True, border_distances.IsLeftDistanceValid) + self.assertEqual(True, border_distances.IsRightDistanceValid) border = xTable.getPropertyValue("TableBorder") @@ -415,8 +415,8 @@ class CheckTable(unittest.TestCase): pv.Value = 'Table1.A1:C2' xDataSource = xChartdataprovider.createDataSource((pv,)) self.assertEqual(len(xDataSource.DataSequences), 3) - expectedValues = ((1, 4), (2, 5), (3, 6)) - expectedCellrange = ('A1:A2', 'B1:B2', 'C1:C2') + expected_values = ((1, 4), (2, 5), (3, 6)) + expected_cellrange = ('A1:A2', 'B1:B2', 'C1:C2') for col in range(3): xSeq = xDataSource.DataSequences[col].Values @@ -424,12 +424,12 @@ class CheckTable(unittest.TestCase): self.assertTrue(xSeq.supportsService('com.sun.star.chart2.data.DataSequence')) self.assertFalse(xSeq.supportsService('foo')) self.assertIn('com.sun.star.chart2.data.DataSequence', xSeq.SupportedServiceNames) - self.assertEqual(xSeq.SourceRangeRepresentation, 'Table1.%s' % expectedCellrange[col]) - self.assertEqual(xSeq.Data, expectedValues[col]) - self.assertEqual(xSeq.NumericalData, expectedValues[col]) + self.assertEqual(xSeq.SourceRangeRepresentation, 'Table1.%s' % expected_cellrange[col]) + self.assertEqual(xSeq.Data, expected_values[col]) + self.assertEqual(xSeq.NumericalData, expected_values[col]) self.assertEqual( [int(txtval) for txtval in xSeq.TextualData], - [val for val in expectedValues[col]]) + [val for val in expected_values[col]]) xSeq.Role = "One xSeq to rule them all" self.assertEqual("One xSeq to rule them all", xSeq.Role) @@ -453,10 +453,10 @@ class CheckTable(unittest.TestCase): # Setup numberformat for the cell xNumberFormats = xDoc.NumberFormats xLocale = Locale('en', 'US', '') - formatString = '#,##0.00 [$€-407];[RED]-#,##0.00 [$€-407]' - key = xNumberFormats.queryKey(formatString, xLocale, True) + format_string = '#,##0.00 [$€-407];[RED]-#,##0.00 [$€-407]' + key = xNumberFormats.queryKey(format_string, xLocale, True) if key == -1: - key = xNumberFormats.addNew(formatString, xLocale) + key = xNumberFormats.addNew(format_string, xLocale) # Apply the format on the first cell xTable.getCellByPosition(0, 0).NumberFormat = key xDispatcher.executeDispatch(xDocFrame, '.uno:GoToStartOfDoc', '', 0, ()) |