fix rounding errors that cause autopkgtests to fail on i386
authorOlivier Tilloy <olivier.tilloy@canonical.com>
Sun, 19 Sep 2021 11:18:06 +0000 (12:18 +0100)
committerRene Engelhard <rene@debian.org>
Sun, 19 Sep 2021 11:18:06 +0000 (12:18 +0100)
Gbp-Pq: Name fix-uicheck-tests-on-i386.patch

sc/qa/uitest/statistics/descriptiveStatistics.py
uitest/impress_tests/drawinglayer.py

index b0fe011fee665c21a4eaa982807e5e8e45927dcb..134f2fbe98e5b6a4a9e1aa168f381ac15e911b31 100644 (file)
@@ -109,7 +109,7 @@ class descriptiveStatistics(UITestCase):
         self.assertEqual(round(get_cell_by_position(document, 0, 6, 7).getValue(),11) , 139.49090909091)
         self.assertEqual(round(get_cell_by_position(document, 0, 6, 8).getValue(),12) , 11.810626955878)
         self.assertEqual(round(get_cell_by_position(document, 0, 6, 9).getValue(),13) , -1.4621677980825)
-        self.assertEqual(round(get_cell_by_position(document, 0, 6, 10).getValue(),14) , 0.01524095329036)
+        self.assertEqual(round(get_cell_by_position(document, 0, 6, 10).getValue(),11) , 0.01524095329)
         self.assertEqual(get_cell_by_position(document, 0, 6, 11).getValue() , 31)
         self.assertEqual(get_cell_by_position(document, 0, 6, 12).getValue() , 26)
         self.assertEqual(get_cell_by_position(document, 0, 6, 13).getValue() , 57)
index 7b33e369d2e610899224166c22f09553f67048bc..82fb81d257c7f1d8e6e4c54cd871b8838b4b0756 100644 (file)
@@ -78,7 +78,7 @@ class ImpressDrawinglayerTest(UITestCase):
         self.assertEqual(25199, document.DrawPages[0].getByIndex(0).Size.Width)
         self.assertEqual(2629, document.DrawPages[0].getByIndex(0).Size.Height)
         self.assertEqual(25199, document.DrawPages[0].getByIndex(1).Size.Width)
-        self.assertEqual(9134, document.DrawPages[0].getByIndex(1).Size.Height)
+        self.assertAlmostEqual(9134, document.DrawPages[0].getByIndex(1).Size.Height,delta=1)
 
         xEditWin = xImpressDoc.getChild("impress_win")
 
@@ -88,7 +88,7 @@ class ImpressDrawinglayerTest(UITestCase):
         self.assertEqual(25199, document.DrawPages[0].getByIndex(0).Size.Width)
         self.assertEqual(2629, document.DrawPages[0].getByIndex(0).Size.Height)
         self.assertEqual(12600, document.DrawPages[0].getByIndex(1).Size.Width)
-        self.assertEqual(4568, document.DrawPages[0].getByIndex(1).Size.Height)
+        self.assertAlmostEqual(4568, document.DrawPages[0].getByIndex(1).Size.Height,delta=1)
 
         self.assertIsNone(document.CurrentSelection)
 
@@ -127,7 +127,7 @@ class ImpressDrawinglayerTest(UITestCase):
         self.assertEqual(25199, document.DrawPages[0].getByIndex(0).Size.Width)
         self.assertEqual(2629, document.DrawPages[0].getByIndex(0).Size.Height)
         self.assertEqual(25199, document.DrawPages[0].getByIndex(1).Size.Width)
-        self.assertEqual(9134, document.DrawPages[0].getByIndex(1).Size.Height)
+        self.assertAlmostEqual(9134, document.DrawPages[0].getByIndex(1).Size.Height,delta=1)
         self.assertEqual(0, document.DrawPages[0].getByIndex(1).RotateAngle)
 
         xEditWin = xImpressDoc.getChild("impress_win")
@@ -138,7 +138,7 @@ class ImpressDrawinglayerTest(UITestCase):
         self.assertEqual(25199, document.DrawPages[0].getByIndex(0).Size.Width)
         self.assertEqual(2629, document.DrawPages[0].getByIndex(0).Size.Height)
         self.assertEqual(25199, document.DrawPages[0].getByIndex(1).Size.Width)
-        self.assertEqual(9134, document.DrawPages[0].getByIndex(1).Size.Height)
+        self.assertAlmostEqual(9134, document.DrawPages[0].getByIndex(1).Size.Height,delta=1)
         self.assertEqual(3000, document.DrawPages[0].getByIndex(1).RotateAngle)
 
         self.assertIsNone(document.CurrentSelection)