Commit fd49f9c1 authored by Jérome Perrin's avatar Jérome Perrin

software/plantuml: check timing diagram

This is a new feature requiring a recent plantuml version
parent e18afc9f
Pipeline #10202 failed with stage
in 0 seconds
...@@ -87,6 +87,27 @@ class TestSimpleDiagram(PlantUMLTestCase, ImageComparisonTestCase): ...@@ -87,6 +87,27 @@ class TestSimpleDiagram(PlantUMLTestCase, ImageComparisonTestCase):
reference = Image.open(os.path.join(os.path.dirname(__file__), "data", "test_class_diagram.png")) reference = Image.open(os.path.join(os.path.dirname(__file__), "data", "test_class_diagram.png"))
self.assertImagesSimilar(Image.open(BytesIO(png)), reference) self.assertImagesSimilar(Image.open(BytesIO(png)), reference)
def test_timing_diagram(self):
png = self.plantuml.processes(textwrap.dedent("""\
@startuml
robust "Web Browser" as WB
concise "Web User" as WU
@0
WU is Idle
WB is Idle
@100
WU is Waiting
WB is Processing
@300
WB is Waiting
@enduml
"""))
reference = Image.open(os.path.join(os.path.dirname(__file__), "data", "test_timing_diagram.png"))
self.assertImagesSimilar(Image.open(BytesIO(png)), reference)
def test_fonts(self): def test_fonts(self):
"""Test slapos provided fonts are used""" """Test slapos provided fonts are used"""
png = self.plantuml.processes(textwrap.dedent("""\ png = self.plantuml.processes(textwrap.dedent("""\
......
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