Commit f252c815 authored by Victor Korobkovsky's avatar Victor Korobkovsky
Browse files

Tests for Border() that show the differences

--HG--
branch : 3.0
parent c451f70d04a4
Pipeline #11417 passed with stage
in 3 minutes and 11 seconds
...@@ -35,17 +35,15 @@ class TestBorder: ...@@ -35,17 +35,15 @@ class TestBorder:
<top style="thin"> <top style="thin">
<color rgb="FF006600"/> <color rgb="FF006600"/>
</top> </top>
<bottom style="thin"> <bottom/>
<color rgb="FF006600"/>
</bottom>
<diagonal/>
</border> </border>
""" """
xml = fromstring(src) xml = fromstring(src)
bd = Border.from_tree(xml) bd = Border.from_tree(xml)
assert bd.left.style == "thin" assert bd.left.style == "thin"
assert bd.right.color.value == "FF006600" assert bd.right.color.value == "FF006600"
assert bd.diagonal.style == None assert bd.bottom.style == None
assert bd.diagonal == None
def test_serialise(self, Border, Side): def test_serialise(self, Border, Side):
...@@ -54,7 +52,6 @@ class TestBorder: ...@@ -54,7 +52,6 @@ class TestBorder:
right=medium_blue, right=medium_blue,
top=medium_blue, top=medium_blue,
bottom=medium_blue, bottom=medium_blue,
diagonal=Side(),
outline=False, outline=False,
diagonalDown=True, diagonalDown=True,
) )
...@@ -73,7 +70,6 @@ class TestBorder: ...@@ -73,7 +70,6 @@ class TestBorder:
<bottom style="medium"> <bottom style="medium">
<color rgb="000000FF"></color> <color rgb="000000FF"></color>
</bottom> </bottom>
<diagonal />
</border> </border>
""" """
diff = compare_xml(xml, expected) diff = compare_xml(xml, expected)
......
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