Commit 469731df authored by VIGNET Pierre's avatar VIGNET Pierre

[lib] Tests: black

parent cff62b3c
......@@ -19,7 +19,7 @@ def feed_SCC_model():
:rtype: <tuple <list>, <str>, <NamedTemporaryFile>>
"""
scc = [['I', 'K', 'J', 'L'], ['Y', 'X', 'Z']]
scc = [["I", "K", "J", "L"], ["Y", "X", "Z"]]
model_without_scc = """<?xml version = "1.0" encoding="ASCII" standalone="yes" ?>
<model xmlns="http://cadbiom" name="">
<CSimpleNode name="A"/>
......@@ -63,7 +63,7 @@ def feed_SCC_model():
# Create the original file model in /tmp/
# Note: prevent the deletion of the file after the close() call
fd_model = tempfile.NamedTemporaryFile(suffix='.bcx', delete=False)
fd_model = tempfile.NamedTemporaryFile(suffix=".bcx", delete=False)
fd_model.write(
"""<model xmlns="http://cadbiom" name="">
<CSimpleNode name="A"/>
......@@ -129,10 +129,10 @@ def test_SCC_search(feed_SCC_model):
_, model_without_scc, model_with_scc = feed_SCC_model
# Make a new model file (with "_without_scc" suffix in filename)
mc.add_start_nodes(model_with_scc.name) # Filename + path
mc.add_start_nodes(model_with_scc.name) # Filename + path
expected_lines = set(model_without_scc.split("\n"))
with open(model_with_scc.name[:-4] + "_without_scc.bcx", 'r') as file:
with open(model_with_scc.name[:-4] + "_without_scc.bcx", "r") as file:
found_lines = set(file.read().split("\n"))
assert found_lines == expected_lines
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