Commit df7047af authored by CharlieC's avatar CharlieC
Browse files

Add additional test case for multiple formatting rules.

Resolves #1186

--HG--
branch : 2.6
parent 0229de51507c
......@@ -339,7 +339,7 @@ class WorksheetReader(object):
for rule in cf.rules:
if rule.dxfId is not None:
rule.dxf = self.ws.parent._differential_styles[rule.dxfId]
self.ws.conditional_formatting[cf] = rule
self.ws.conditional_formatting[cf] = rule
def bind_tables(self):
......
......@@ -401,6 +401,14 @@
<conditionalFormatting sqref="T1:T10">
<cfRule type="top10" dxfId="2" priority="11" bottom="1" rank="4"/>
</conditionalFormatting>
<conditionalFormatting sqref="A1">
<cfRule type="expression" dxfId="3" priority="2">
<formula>A1&lt;3</formula>
</cfRule>
<cfRule type="expression" dxfId="2" priority="1">
<formula>A1&gt;=3</formula>
</cfRule>
</conditionalFormatting>
<hyperlinks>
<hyperlink ref="B4:B7" location="'STP nn000TL-10, PKG 2.52'!A1" display="STP 10000TL-10"/>
<hyperlink display="http://test.com" r:id="rId1" ref="A1"/>
......
......@@ -745,7 +745,9 @@ class TestWorksheetReader:
reader.bind_formatting()
assert ws.conditional_formatting['T1:T10'][-1].dxf == DifferentialStyle()
fmts = ws.conditional_formatting
assert fmts['T1:T10'][-1].dxf == DifferentialStyle()
assert len(fmts['A1']) == 2
def test_merged(self, PrimedWorksheetReader):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment