summaryrefslogtreecommitdiff
path: root/pyuno
diff options
context:
space:
mode:
authorChenxiong Qi <qcxhome@gmail.com>2022-09-01 08:44:20 +0800
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-09-05 16:05:56 +0200
commit9928f139e858768047b8dea0405720395beb18cd (patch)
tree2c94ff2463ce205c41c80b0c26ff82cd3a1cf244 /pyuno
parent14cff82b314709db488d929b75c254fbb0355419 (diff)
tdf#97361 replace getCellByPosition with access by subscript
Signed-off-by: Chenxiong Qi <qcxhome@gmail.com> Change-Id: I50d6e29c34e3cf72cdf0afc9f118fafc3c144eaf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139141 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'pyuno')
-rw-r--r--pyuno/qa/pytests/insertremovecells.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/pyuno/qa/pytests/insertremovecells.py b/pyuno/qa/pytests/insertremovecells.py
index f1c0fa176113..1d850a65d9fd 100644
--- a/pyuno/qa/pytests/insertremovecells.py
+++ b/pyuno/qa/pytests/insertremovecells.py
@@ -57,19 +57,19 @@ class InsertRemoveCells(unittest.TestCase):
(3, 3, '6', 6.0),
(5, 1, '1', 1.0),
)
- for pos in empty_cells:
- cell = sheet.getCellByPosition(*pos)
+ for col, row in empty_cells:
+ cell = sheet[row,col]
self.assertEqual('EMPTY', cell.Type.value)
- for x, y, f, s, val in formula_cells:
- cell = sheet.getCellByPosition(x, y)
+ for col, row, f, s, val in formula_cells:
+ cell = sheet[row,col]
self.assertEqual('FORMULA', cell.Type.value)
self.assertEqual(f, cell.getFormula())
self.assertEqual(s, cell.String)
self.assertEqual(val, cell.Value)
- for x, y, s, val in value_cells:
- cell = sheet.getCellByPosition(x, y)
+ for col, row, s, val in value_cells:
+ cell = sheet[row,col]
self.assertEqual(s, cell.String)
self.assertEqual(val, cell.Value)