[Libreoffice-commits] core.git: sw/qa
Thomas Arnhold
thomas at arnhold.org
Wed Aug 13 13:25:31 PDT 2014
sw/qa/python/check_table.py | 248 ++++++++++++++++++++++----------------------
1 file changed, 124 insertions(+), 124 deletions(-)
New commits:
commit 0cddb93eb4dda90b646fe099c44cd1f6bc8645f4
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Wed Aug 13 22:23:28 2014 +0200
check_table.py: use assertEqual()
To fix
DeprecationWarning: Please use assertEqual instead.
Change-Id: Iae7cb50dd968d055b106e35baa7eee526a50bf6d
diff --git a/sw/qa/python/check_table.py b/sw/qa/python/check_table.py
index 2760e7c..9ec6187 100644
--- a/sw/qa/python/check_table.py
+++ b/sw/qa/python/check_table.py
@@ -32,43 +32,43 @@ class CheckTable(unittest.TestCase):
border = xTable.getPropertyValue("TableBorder")
self.assertTrue(border.IsTopLineValid)
- self.assertEquals(0, border.TopLine.InnerLineWidth)
- self.assertEquals(2, border.TopLine.OuterLineWidth)
- self.assertEquals(0, border.TopLine.LineDistance)
- self.assertEquals(0, border.TopLine.Color)
+ self.assertEqual(0, border.TopLine.InnerLineWidth)
+ self.assertEqual(2, border.TopLine.OuterLineWidth)
+ self.assertEqual(0, border.TopLine.LineDistance)
+ self.assertEqual(0, border.TopLine.Color)
self.assertTrue(border.IsBottomLineValid)
- self.assertEquals(0, border.BottomLine.InnerLineWidth)
- self.assertEquals(2, border.BottomLine.OuterLineWidth)
- self.assertEquals(0, border.BottomLine.LineDistance)
- self.assertEquals(0, border.BottomLine.Color)
+ self.assertEqual(0, border.BottomLine.InnerLineWidth)
+ self.assertEqual(2, border.BottomLine.OuterLineWidth)
+ self.assertEqual(0, border.BottomLine.LineDistance)
+ self.assertEqual(0, border.BottomLine.Color)
self.assertTrue(border.IsLeftLineValid)
- self.assertEquals(0, border.LeftLine.InnerLineWidth)
- self.assertEquals(2, border.LeftLine.OuterLineWidth)
- self.assertEquals(0, border.LeftLine.LineDistance)
- self.assertEquals(0, border.LeftLine.Color)
+ self.assertEqual(0, border.LeftLine.InnerLineWidth)
+ self.assertEqual(2, border.LeftLine.OuterLineWidth)
+ self.assertEqual(0, border.LeftLine.LineDistance)
+ self.assertEqual(0, border.LeftLine.Color)
self.assertTrue(border.IsRightLineValid)
- self.assertEquals(0, border.RightLine.InnerLineWidth)
- self.assertEquals(2, border.RightLine.OuterLineWidth)
- self.assertEquals(0, border.RightLine.LineDistance)
- self.assertEquals(0, border.RightLine.Color)
+ self.assertEqual(0, border.RightLine.InnerLineWidth)
+ self.assertEqual(2, border.RightLine.OuterLineWidth)
+ self.assertEqual(0, border.RightLine.LineDistance)
+ self.assertEqual(0, border.RightLine.Color)
self.assertTrue(border.IsHorizontalLineValid)
- self.assertEquals(0, border.HorizontalLine.InnerLineWidth)
- self.assertEquals(2, border.HorizontalLine.OuterLineWidth)
- self.assertEquals(0, border.HorizontalLine.LineDistance)
- self.assertEquals(0, border.HorizontalLine.Color)
+ self.assertEqual(0, border.HorizontalLine.InnerLineWidth)
+ self.assertEqual(2, border.HorizontalLine.OuterLineWidth)
+ self.assertEqual(0, border.HorizontalLine.LineDistance)
+ self.assertEqual(0, border.HorizontalLine.Color)
self.assertTrue(border.IsVerticalLineValid)
- self.assertEquals(0, border.VerticalLine.InnerLineWidth)
- self.assertEquals(2, border.VerticalLine.OuterLineWidth)
- self.assertEquals(0, border.VerticalLine.LineDistance)
- self.assertEquals(0, border.VerticalLine.Color)
+ self.assertEqual(0, border.VerticalLine.InnerLineWidth)
+ self.assertEqual(2, border.VerticalLine.OuterLineWidth)
+ self.assertEqual(0, border.VerticalLine.LineDistance)
+ self.assertEqual(0, border.VerticalLine.Color)
self.assertTrue(border.IsDistanceValid)
- self.assertEquals(97, border.Distance)
+ self.assertEqual(97, border.Distance)
# set border
border.TopLine = BorderLine(0, 11, 19, 19)
border.BottomLine = BorderLine(0xFF, 00, 11, 00)
@@ -78,95 +78,95 @@ class CheckTable(unittest.TestCase):
border = xTable.getPropertyValue("TableBorder")
self.assertTrue(border.IsTopLineValid)
- self.assertEquals(11, border.TopLine.InnerLineWidth)
- self.assertEquals(19, border.TopLine.OuterLineWidth)
- self.assertEquals(19, border.TopLine.LineDistance)
- self.assertEquals(0, border.TopLine.Color)
+ self.assertEqual(11, border.TopLine.InnerLineWidth)
+ self.assertEqual(19, border.TopLine.OuterLineWidth)
+ self.assertEqual(19, border.TopLine.LineDistance)
+ self.assertEqual(0, border.TopLine.Color)
self.assertTrue(border.IsBottomLineValid)
- self.assertEquals(0, border.BottomLine.InnerLineWidth)
- self.assertEquals(11, border.BottomLine.OuterLineWidth)
- self.assertEquals(0, border.BottomLine.LineDistance)
- self.assertEquals(0xFF, border.BottomLine.Color)
+ self.assertEqual(0, border.BottomLine.InnerLineWidth)
+ self.assertEqual(11, border.BottomLine.OuterLineWidth)
+ self.assertEqual(0, border.BottomLine.LineDistance)
+ self.assertEqual(0xFF, border.BottomLine.Color)
self.assertTrue(border.IsLeftLineValid)
- self.assertEquals(0, border.LeftLine.InnerLineWidth)
- self.assertEquals(2, border.LeftLine.OuterLineWidth)
- self.assertEquals(0, border.LeftLine.LineDistance)
- self.assertEquals(0, border.LeftLine.Color)
+ self.assertEqual(0, border.LeftLine.InnerLineWidth)
+ self.assertEqual(2, border.LeftLine.OuterLineWidth)
+ self.assertEqual(0, border.LeftLine.LineDistance)
+ self.assertEqual(0, border.LeftLine.Color)
self.assertTrue(border.IsRightLineValid)
- self.assertEquals(0, border.RightLine.InnerLineWidth)
- self.assertEquals(2, border.RightLine.OuterLineWidth)
- self.assertEquals(0, border.RightLine.LineDistance)
- self.assertEquals(0, border.RightLine.Color)
+ self.assertEqual(0, border.RightLine.InnerLineWidth)
+ self.assertEqual(2, border.RightLine.OuterLineWidth)
+ self.assertEqual(0, border.RightLine.LineDistance)
+ self.assertEqual(0, border.RightLine.Color)
self.assertTrue(border.IsHorizontalLineValid)
- self.assertEquals(0, border.HorizontalLine.InnerLineWidth)
- self.assertEquals(90, border.HorizontalLine.OuterLineWidth)
- self.assertEquals(0, border.HorizontalLine.LineDistance)
- self.assertEquals(0xFF00, border.HorizontalLine.Color)
+ self.assertEqual(0, border.HorizontalLine.InnerLineWidth)
+ self.assertEqual(90, border.HorizontalLine.OuterLineWidth)
+ self.assertEqual(0, border.HorizontalLine.LineDistance)
+ self.assertEqual(0xFF00, border.HorizontalLine.Color)
self.assertTrue(border.IsVerticalLineValid)
- self.assertEquals(0, border.VerticalLine.InnerLineWidth)
- self.assertEquals(2, border.VerticalLine.OuterLineWidth)
- self.assertEquals(0, border.VerticalLine.LineDistance)
- self.assertEquals(0, border.VerticalLine.Color)
+ self.assertEqual(0, border.VerticalLine.InnerLineWidth)
+ self.assertEqual(2, border.VerticalLine.OuterLineWidth)
+ self.assertEqual(0, border.VerticalLine.LineDistance)
+ self.assertEqual(0, border.VerticalLine.Color)
self.assertTrue(border.IsDistanceValid)
- self.assertEquals(97, border.Distance)
+ self.assertEqual(97, border.Distance)
border2 = xTable.getPropertyValue("TableBorder2")
self.assertTrue(border2.IsTopLineValid)
- self.assertEquals(11, border2.TopLine.InnerLineWidth)
- self.assertEquals(19, border2.TopLine.OuterLineWidth)
- self.assertEquals(19, border2.TopLine.LineDistance)
- self.assertEquals(0, border2.TopLine.Color)
- self.assertEquals(DOUBLE, border2.TopLine.LineStyle)
- self.assertEquals(49, border2.TopLine.LineWidth)
+ self.assertEqual(11, border2.TopLine.InnerLineWidth)
+ self.assertEqual(19, border2.TopLine.OuterLineWidth)
+ self.assertEqual(19, border2.TopLine.LineDistance)
+ self.assertEqual(0, border2.TopLine.Color)
+ self.assertEqual(DOUBLE, border2.TopLine.LineStyle)
+ self.assertEqual(49, border2.TopLine.LineWidth)
self.assertTrue(border2.IsBottomLineValid)
- self.assertEquals(0, border2.BottomLine.InnerLineWidth)
- self.assertEquals(11, border2.BottomLine.OuterLineWidth)
- self.assertEquals(0, border2.BottomLine.LineDistance)
- self.assertEquals(0xFF, border2.BottomLine.Color)
- self.assertEquals(SOLID, border2.BottomLine.LineStyle)
- self.assertEquals(11, border2.BottomLine.LineWidth)
+ self.assertEqual(0, border2.BottomLine.InnerLineWidth)
+ self.assertEqual(11, border2.BottomLine.OuterLineWidth)
+ self.assertEqual(0, border2.BottomLine.LineDistance)
+ self.assertEqual(0xFF, border2.BottomLine.Color)
+ self.assertEqual(SOLID, border2.BottomLine.LineStyle)
+ self.assertEqual(11, border2.BottomLine.LineWidth)
self.assertTrue(border2.IsLeftLineValid)
- self.assertEquals(0, border2.LeftLine.InnerLineWidth)
- self.assertEquals(2, border2.LeftLine.OuterLineWidth)
- self.assertEquals(0, border2.LeftLine.LineDistance)
- self.assertEquals(0, border2.LeftLine.Color)
- self.assertEquals(SOLID, border2.LeftLine.LineStyle)
- self.assertEquals(2, border2.LeftLine.LineWidth)
+ self.assertEqual(0, border2.LeftLine.InnerLineWidth)
+ self.assertEqual(2, border2.LeftLine.OuterLineWidth)
+ self.assertEqual(0, border2.LeftLine.LineDistance)
+ self.assertEqual(0, border2.LeftLine.Color)
+ self.assertEqual(SOLID, border2.LeftLine.LineStyle)
+ self.assertEqual(2, border2.LeftLine.LineWidth)
self.assertTrue(border2.IsRightLineValid)
- self.assertEquals(0, border2.RightLine.InnerLineWidth)
- self.assertEquals(2, border2.RightLine.OuterLineWidth)
- self.assertEquals(0, border2.RightLine.LineDistance)
- self.assertEquals(0, border2.RightLine.Color)
- self.assertEquals(SOLID, border2.RightLine.LineStyle)
- self.assertEquals(2, border2.RightLine.LineWidth)
+ self.assertEqual(0, border2.RightLine.InnerLineWidth)
+ self.assertEqual(2, border2.RightLine.OuterLineWidth)
+ self.assertEqual(0, border2.RightLine.LineDistance)
+ self.assertEqual(0, border2.RightLine.Color)
+ self.assertEqual(SOLID, border2.RightLine.LineStyle)
+ self.assertEqual(2, border2.RightLine.LineWidth)
self.assertTrue(border2.IsHorizontalLineValid)
- self.assertEquals(0, border2.HorizontalLine.InnerLineWidth)
- self.assertEquals(90, border2.HorizontalLine.OuterLineWidth)
- self.assertEquals(0, border2.HorizontalLine.LineDistance)
- self.assertEquals(0xFF00, border2.HorizontalLine.Color)
- self.assertEquals(SOLID, border2.HorizontalLine.LineStyle)
- self.assertEquals(90, border2.HorizontalLine.LineWidth)
+ self.assertEqual(0, border2.HorizontalLine.InnerLineWidth)
+ self.assertEqual(90, border2.HorizontalLine.OuterLineWidth)
+ self.assertEqual(0, border2.HorizontalLine.LineDistance)
+ self.assertEqual(0xFF00, border2.HorizontalLine.Color)
+ self.assertEqual(SOLID, border2.HorizontalLine.LineStyle)
+ self.assertEqual(90, border2.HorizontalLine.LineWidth)
self.assertTrue(border2.IsVerticalLineValid)
- self.assertEquals(0, border2.VerticalLine.InnerLineWidth)
- self.assertEquals(2, border2.VerticalLine.OuterLineWidth)
- self.assertEquals(0, border2.VerticalLine.LineDistance)
- self.assertEquals(0, border2.VerticalLine.Color)
- self.assertEquals(SOLID, border2.VerticalLine.LineStyle)
- self.assertEquals(2, border2.VerticalLine.LineWidth)
+ self.assertEqual(0, border2.VerticalLine.InnerLineWidth)
+ self.assertEqual(2, border2.VerticalLine.OuterLineWidth)
+ self.assertEqual(0, border2.VerticalLine.LineDistance)
+ self.assertEqual(0, border2.VerticalLine.Color)
+ self.assertEqual(SOLID, border2.VerticalLine.LineStyle)
+ self.assertEqual(2, border2.VerticalLine.LineWidth)
self.assertTrue(border2.IsDistanceValid)
- self.assertEquals(97, border2.Distance)
+ self.assertEqual(97, border2.Distance)
# set border2
border2.RightLine = BorderLine2(0, 0, 0, 0, THICKTHIN_LARGEGAP, 120)
border2.LeftLine = BorderLine2(0, 0, 0, 0, EMBOSSED, 90)
@@ -177,55 +177,55 @@ class CheckTable(unittest.TestCase):
border2 = xTable.getPropertyValue("TableBorder2")
self.assertTrue(border2.IsTopLineValid)
- self.assertEquals(11, border2.TopLine.InnerLineWidth)
- self.assertEquals(19, border2.TopLine.OuterLineWidth)
- self.assertEquals(19, border2.TopLine.LineDistance)
- self.assertEquals(0, border2.TopLine.Color)
- self.assertEquals(DOUBLE, border2.TopLine.LineStyle)
- self.assertEquals(49, border2.TopLine.LineWidth)
+ self.assertEqual(11, border2.TopLine.InnerLineWidth)
+ self.assertEqual(19, border2.TopLine.OuterLineWidth)
+ self.assertEqual(19, border2.TopLine.LineDistance)
+ self.assertEqual(0, border2.TopLine.Color)
+ self.assertEqual(DOUBLE, border2.TopLine.LineStyle)
+ self.assertEqual(49, border2.TopLine.LineWidth)
self.assertTrue(border2.IsBottomLineValid)
- self.assertEquals(0, border2.BottomLine.InnerLineWidth)
- self.assertEquals(11, border2.BottomLine.OuterLineWidth)
- self.assertEquals(0, border2.BottomLine.LineDistance)
- self.assertEquals(0xFF, border2.BottomLine.Color)
- self.assertEquals(SOLID, border2.BottomLine.LineStyle)
- self.assertEquals(11, border2.BottomLine.LineWidth)
+ self.assertEqual(0, border2.BottomLine.InnerLineWidth)
+ self.assertEqual(11, border2.BottomLine.OuterLineWidth)
+ self.assertEqual(0, border2.BottomLine.LineDistance)
+ self.assertEqual(0xFF, border2.BottomLine.Color)
+ self.assertEqual(SOLID, border2.BottomLine.LineStyle)
+ self.assertEqual(11, border2.BottomLine.LineWidth)
self.assertTrue(border2.IsLeftLineValid)
- self.assertEquals(23, border2.LeftLine.InnerLineWidth)
- self.assertEquals(23, border2.LeftLine.OuterLineWidth)
- self.assertEquals(46, border2.LeftLine.LineDistance)
- self.assertEquals(0, border2.LeftLine.Color)
- self.assertEquals(EMBOSSED, border2.LeftLine.LineStyle)
- self.assertEquals(90, border2.LeftLine.LineWidth)
+ self.assertEqual(23, border2.LeftLine.InnerLineWidth)
+ self.assertEqual(23, border2.LeftLine.OuterLineWidth)
+ self.assertEqual(46, border2.LeftLine.LineDistance)
+ self.assertEqual(0, border2.LeftLine.Color)
+ self.assertEqual(EMBOSSED, border2.LeftLine.LineStyle)
+ self.assertEqual(90, border2.LeftLine.LineWidth)
self.assertTrue(border2.IsRightLineValid)
- self.assertEquals(53, border2.RightLine.InnerLineWidth)
- self.assertEquals(26, border2.RightLine.OuterLineWidth)
- self.assertEquals(41, border2.RightLine.LineDistance)
- self.assertEquals(0, border2.RightLine.Color)
- self.assertEquals(THICKTHIN_LARGEGAP, border2.RightLine.LineStyle)
- self.assertEquals(120, border2.RightLine.LineWidth)
+ self.assertEqual(53, border2.RightLine.InnerLineWidth)
+ self.assertEqual(26, border2.RightLine.OuterLineWidth)
+ self.assertEqual(41, border2.RightLine.LineDistance)
+ self.assertEqual(0, border2.RightLine.Color)
+ self.assertEqual(THICKTHIN_LARGEGAP, border2.RightLine.LineStyle)
+ self.assertEqual(120, border2.RightLine.LineWidth)
self.assertTrue(border2.IsHorizontalLineValid)
- self.assertEquals(0, border2.HorizontalLine.InnerLineWidth)
- self.assertEquals(11, border2.HorizontalLine.OuterLineWidth)
- self.assertEquals(0, border2.HorizontalLine.LineDistance)
- self.assertEquals(0xFF00, border2.HorizontalLine.Color)
- self.assertEquals(DASHED, border2.HorizontalLine.LineStyle)
- self.assertEquals(11, border2.HorizontalLine.LineWidth)
+ self.assertEqual(0, border2.HorizontalLine.InnerLineWidth)
+ self.assertEqual(11, border2.HorizontalLine.OuterLineWidth)
+ self.assertEqual(0, border2.HorizontalLine.LineDistance)
+ self.assertEqual(0xFF00, border2.HorizontalLine.Color)
+ self.assertEqual(DASHED, border2.HorizontalLine.LineStyle)
+ self.assertEqual(11, border2.HorizontalLine.LineWidth)
self.assertTrue(border2.IsVerticalLineValid)
- self.assertEquals(0, border2.VerticalLine.InnerLineWidth)
- self.assertEquals(90, border2.VerticalLine.OuterLineWidth)
- self.assertEquals(0, border2.VerticalLine.LineDistance)
- self.assertEquals(0xFF, border2.VerticalLine.Color)
- self.assertEquals(DOTTED, border2.VerticalLine.LineStyle)
- self.assertEquals(90, border2.VerticalLine.LineWidth)
+ self.assertEqual(0, border2.VerticalLine.InnerLineWidth)
+ self.assertEqual(90, border2.VerticalLine.OuterLineWidth)
+ self.assertEqual(0, border2.VerticalLine.LineDistance)
+ self.assertEqual(0xFF, border2.VerticalLine.Color)
+ self.assertEqual(DOTTED, border2.VerticalLine.LineStyle)
+ self.assertEqual(90, border2.VerticalLine.LineWidth)
self.assertTrue(border2.IsDistanceValid)
- self.assertEquals(97, border2.Distance)
+ self.assertEqual(97, border2.Distance)
# close document
xDoc.dispose()
More information about the Libreoffice-commits
mailing list