Skip to content
Snippets Groups Projects
Commit 2d18f611 authored by George Marchment's avatar George Marchment
Browse files

Merge branch 'processes_2_remove_None_or_empty' into 'main'

Add test on processes_2_remove get empty string

See merge request !11
parents a4845b37 ba309101
No related branches found
No related tags found
1 merge request!11Add test on processes_2_remove get empty string
Pipeline #13285 passed with stages
in 2 minutes and 5 seconds
......@@ -33,6 +33,8 @@ class Workflow:
self.keywords = keywords
self.producer = producer
self.publisher = publisher
if(processes_2_remove==""):
processes_2_remove = None
self.processes_2_remove = processes_2_remove
self.log = ""
self.fill_log()
......
......@@ -26,3 +26,26 @@ class TestCall(unittest.TestCase):
output_dir=str(my_results),
name="https://github.com/blabla/toto:qsd!qsd%#sqdqsd"
)
def test_with_processes_2_remove_empty_str(self):
with TemporaryDirectory() as my_temp_dir1, TemporaryDirectory() as my_temp_dir2:
my_results1 = pathlib.Path(my_temp_dir1) / "my_results"
cli(
"./wf_test/main.nf",
render_graphs=True,
output_dir=str(my_results1),
processes_2_remove="",
)
my_results2 = pathlib.Path(my_temp_dir2) / "my_results"
cli(
"./wf_test/main.nf",
render_graphs=True,
output_dir=str(my_results2),
processes_2_remove=None,
)
with open(my_results1 / 'graphs'/'specification_graph.png', 'rb') as f_spec1:
spec1 = f_spec1.read()
with open(my_results2 / 'graphs'/'specification_graph.png', 'rb') as f_spec2:
spec2 = f_spec2.read()
self.assertEqual(spec1, spec2)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment