summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-07-01 13:45:23 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-07-03 22:12:57 +0200
commit53e7011084e6f03bf2e9dc6ccccf8e1f45224707 (patch)
tree3208d5e0e6777ba32e572cb2e6ddd521ba40b1dc /sw
parentf96b38ddda1759023e6021511d6d660abf98a54e (diff)
be picky and check explicit implementation name
- the previous code tried to avoid breakage from changing an implementation detail - this turns out to be harder than expected in a Python2/3 portable way - also it would mean the intentional drive-by documentation of the expected implementation name will at least not bit rot now Change-Id: I5972d0e79ef64abe30573182c5e23268e4830ade
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/python/check_table.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/sw/qa/python/check_table.py b/sw/qa/python/check_table.py
index 299661420b9f..a5a8308e355c 100644
--- a/sw/qa/python/check_table.py
+++ b/sw/qa/python/check_table.py
@@ -356,7 +356,7 @@ class CheckTable(unittest.TestCase):
xTable.ChartRowAsLabel = False
xTable.Data = ((1,2,3), (4,5,6), (7,8,9), (10,11,12))
xRows = xTable.Rows
- self.assertIs(type(xRows.ImplementationName), type('SwXTableRows')) # not testing value, just type and coverage
+ self.assertEquals(xRows.ImplementationName, 'SwXTableRows')
self.assertTrue(xRows.supportsService('com.sun.star.text.TableRows'))
self.assertFalse(xRows.supportsService('foo'))
self.assertIn('com.sun.star.text.TableRows', xRows.SupportedServiceNames)
@@ -364,7 +364,7 @@ class CheckTable(unittest.TestCase):
xRows.removeByIndex(1, 2)
self.assertEqual( xTable.Data, ((1,2,3), (10,11,12)))
xCols = xTable.Columns
- self.assertIs(type(xCols.ImplementationName), type('SwXTableColumns')) # not testing value, just type and coverage
+ self.assertEquals(xCols.ImplementationName, 'SwXTableColumns')
self.assertTrue(xCols.supportsService('com.sun.star.text.TableColumns'))
self.assertFalse(xCols.supportsService('foo'))
self.assertIn('com.sun.star.text.TableColumns', xCols.SupportedServiceNames)
@@ -427,7 +427,7 @@ class CheckTable(unittest.TestCase):
self.assertTrue(xTable.Name == 'Table1')
self.assertIn('com.sun.star.text.GenericTextDocument', xDoc.SupportedServiceNames)
xChartdataprovider = xDoc.createInstance('com.sun.star.chart2.data.DataProvider')
- self.assertIs(type(xChartdataprovider.ImplementationName), type('SwChartDataProvider')) # not testing value, just type and coverage
+ self.assertEquals(xChartdataprovider.ImplementationName, 'SwChartDataProvider')
self.assertTrue(xChartdataprovider.supportsService('com.sun.star.chart2.data.DataProvider'))
self.assertFalse(xChartdataprovider.supportsService('foo'))
self.assertIn('com.sun.star.chart2.data.DataProvider', xChartdataprovider.SupportedServiceNames)
@@ -440,7 +440,7 @@ class CheckTable(unittest.TestCase):
expectedCellrange = ('A1:A2', 'B1:B2', 'C1:C2')
for col in range(3):
xSeq = xDataSource.DataSequences[col].Values
- self.assertIs(type(xSeq.ImplementationName), type('SwChartDataSequence')) # not testing value, just type and coverage
+ self.assertEquals(xSeq.ImplementationName, 'SwChartDataSequence')
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)