[Libreoffice-commits] core.git: sw/qa
kerem
hallackerem at gmail.com
Tue Jan 3 17:14:13 UTC 2017
sw/qa/python/check_flies.py | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
New commits:
commit c2e69df36464437d70c4396a4bc5932e6a97a0ff
Author: kerem <hallackerem at gmail.com>
Date: Fri Dec 23 00:25:38 2016 +0200
tdf#97361: Changed method calls in check_flies
Change-Id: I6148ffccd4284cfc72fed2c7f4538054a5aaf24c
Reviewed-on: https://gerrit.libreoffice.org/32358
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>
diff --git a/sw/qa/python/check_flies.py b/sw/qa/python/check_flies.py
index 57fe4db..109d75b 100644
--- a/sw/qa/python/check_flies.py
+++ b/sw/qa/python/check_flies.py
@@ -61,7 +61,7 @@ class CheckFlies(unittest.TestCase):
vExpectedEmbeddedFrames.remove(sFrameName)
# raises ValueError if not found
print (sFrameName)
- xEmbeddedFrames.getByName(sFrameName)
+ xEmbeddedFrames[sFrameName]
self.assertTrue(xEmbeddedFrames.hasByName(sFrameName),
"Could not find embedded frame by name.")
@@ -69,9 +69,9 @@ class CheckFlies(unittest.TestCase):
xEmbeddedFramesIdx = xEmbeddedFrames
- self.assertEqual(nEmbeddedFrames, xEmbeddedFramesIdx.getCount(), "Unexpected number of embedded frames reported")
+ self.assertEqual(nEmbeddedFrames, len(xEmbeddedFramesIdx), "Unexpected number of embedded frames reported")
- for nCurrentFrameIdx in range(xEmbeddedFramesIdx.getCount()):
+ for nCurrentFrameIdx in range(len(xEmbeddedFramesIdx)):
xEmbeddedFramesIdx.getByIndex(nCurrentFrameIdx)
def checkGraphicFrames(self, xTGOS):
@@ -82,7 +82,7 @@ class CheckFlies(unittest.TestCase):
for sFrameName in xGraphicFrames.getElementNames():
vExpectedGraphicFrames.remove(sFrameName)
# raises ValueError if not found
- xGraphicFrames.getByName(sFrameName)
+ xGraphicFrames[sFrameName]
self.assertTrue(
xGraphicFrames.hasByName(sFrameName),
"Could not find graphics frame by name.")
@@ -91,9 +91,9 @@ class CheckFlies(unittest.TestCase):
"Missing expected graphics frames.")
xGraphicFramesIdx = xGraphicFrames
- self.assertEqual(nGraphicFrames, xGraphicFramesIdx.getCount(), "Unexpected number of graphics frames reported")
+ self.assertEqual(nGraphicFrames, len(xGraphicFramesIdx), "Unexpected number of graphics frames reported")
- for nCurrentFrameIdx in range(xGraphicFramesIdx.getCount()):
+ for nCurrentFrameIdx in range(len(xGraphicFramesIdx)):
xGraphicFramesIdx.getByIndex(nCurrentFrameIdx)
def checkTextFrames(self, xTFS):
@@ -105,7 +105,7 @@ class CheckFlies(unittest.TestCase):
for sFrameName in xTextFrames.getElementNames():
vExpectedTextFrames.remove(sFrameName)
# raises ValueError if not found
- xTextFrames.getByName(sFrameName)
+ xTextFrames[sFrameName]
self.assertTrue(
xTextFrames.hasByName(sFrameName),
"Could not find text frame by name.")
@@ -115,9 +115,9 @@ class CheckFlies(unittest.TestCase):
xTextFramesIdx = xTextFrames
- self.assertEqual(nTextFrames, xTextFrames.getCount(), "Unexpected number of text frames reported")
+ self.assertEqual(nTextFrames, len(xTextFrames), "Unexpected number of text frames reported")
- for nCurrentFrameIdx in range(xTextFramesIdx.getCount()):
+ for nCurrentFrameIdx in range(len(xTextFramesIdx)):
xTextFramesIdx.getByIndex(nCurrentFrameIdx)
More information about the Libreoffice-commits
mailing list