From bab3e7199d2133dfbbd15956e56dd5245a3b75e5 Mon Sep 17 00:00:00 2001 From: Bryan Brancotte <bryan.brancotte@pasteur.fr> Date: Thu, 14 Mar 2024 09:48:59 +0000 Subject: [PATCH] Add test on processes_2_remove get empty string --- tests/test_cli.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tests/test_cli.py b/tests/test_cli.py index 981deae..91b7f97 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -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) -- GitLab