[fix] indentation

pull/592/head
tessier 4 years ago
parent 5d1c64bea2
commit 68deaba85f

@ -191,10 +191,10 @@ class Diagram:
def render(self) -> None: def render(self) -> None:
if isinstance(self.outformat, list): if isinstance(self.outformat, list):
for one_format in self.outformat: for one_format in self.outformat:
self.dot.render(format=one_format, view=self.show, quiet=True) self.dot.render(format=one_format, view=self.show, quiet=True)
else: else:
self.dot.render(format=self.outformat, view=self.show, quiet=True) self.dot.render(format=self.outformat, view=self.show, quiet=True)
class Cluster: class Cluster:

@ -108,16 +108,16 @@ class DiagramTest(unittest.TestCase):
self.assertTrue(os.path.exists(f"{self.name}.png")) self.assertTrue(os.path.exists(f"{self.name}.png"))
def test_outformat_list(self): def test_outformat_list(self):
"""Check that outformat render all the files from the list.""" """Check that outformat render all the files from the list."""
self.name = 'diagrams_image' self.name = 'diagrams_image'
with Diagram(show=False, outformat=["dot", "png"]): with Diagram(show=False, outformat=["dot", "png"]):
Node("node1") Node("node1")
# both files must exist # both files must exist
self.assertTrue(os.path.exists(f"{self.name}.png")) self.assertTrue(os.path.exists(f"{self.name}.png"))
self.assertTrue(os.path.exists(f"{self.name}.dot")) self.assertTrue(os.path.exists(f"{self.name}.dot"))
# clean the dot file as it only generated here # clean the dot file as it only generated here
os.remove(self.name + ".dot") os.remove(self.name + ".dot")
class ClusterTest(unittest.TestCase): class ClusterTest(unittest.TestCase):

Loading…
Cancel
Save