diff options
Diffstat (limited to 'test/fotree')
-rwxr-xr-x | test/fotree/unittests/table/collapsed-conditional-borders_test-generator.py | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/test/fotree/unittests/table/collapsed-conditional-borders_test-generator.py b/test/fotree/unittests/table/collapsed-conditional-borders_test-generator.py index b3b697235..1bd5d441d 100755 --- a/test/fotree/unittests/table/collapsed-conditional-borders_test-generator.py +++ b/test/fotree/unittests/table/collapsed-conditional-borders_test-generator.py @@ -74,7 +74,7 @@ class TableGenerator: ] bordersBefore = None - resBefore = None + resBefore = {} """The comma between each table; nothing before the first one.""" separator = '' @@ -85,8 +85,8 @@ class TableGenerator: Params: borderSet: a list of 5 border specifications for resp. table, table-column, table-body, table-row and table-cell - resolution: the resolved border for the leading and rest cases (for the normal - case the resolution is always the same) + resolution: the resolved border for the rest case (for the normal and leading + cases the resolution is always the same) """ if not self.bordersBefore: self.bordersBefore = borderSet @@ -110,16 +110,14 @@ class TableGenerator: sys.stderr.write(self.separator + '{') comma = '' for beforeAfter in [self.resBefore, resolution]: - for leadRest in range(2): - sys.stderr.write(comma + '{border' + beforeAfter[leadRest]['length'] - + ', Color.' + beforeAfter[leadRest]['color'] - + '}') - comma = ', ' + sys.stderr.write(comma + '{border' + beforeAfter['length'] + + ', Color.' + beforeAfter['color'] + '}') + comma = ', ' sys.stderr.write('}') self.separator = ',\n' # Reset self.bordersBefore = None - self.resBefore = None + self.resBefore = {} class TableHFGenerator: """Generates on stdout tables with headers and footers, and the border specifications @@ -254,7 +252,7 @@ def generateTestCases(): defaultBorders.append({'length': '4pt', 'cond': 'discard', 'color': color}) defaultBorders[fo_table]['length'] = '8pt' - resolution = [{'length': '4pt', 'color': 'yellow'}, {'length': '0pt', 'color': 'black'}] + resolution = {'length': '0pt', 'color': 'black'} tableGenerator.addBorderSet(defaultBorders, resolution) for combinations in createAllCombinations()[1:]: for combination in combinations: @@ -266,9 +264,9 @@ def generateTestCases(): if index != fo_table: finalBorders[index]['length'] = '6pt' if fo_table in combination: - resolution = [{'length': '8pt', 'color': 'black'}] * 2 + resolution = {'length': '8pt', 'color': 'black'} else: - resolution = [{'length': '6pt', 'color': finalBorders[index]['color']}] * 2 + resolution = {'length': '6pt', 'color': finalBorders[index]['color']} tableGenerator.addBorderSet(finalBorders, resolution) printFOEnd() |