From c505a4dad793c83b048467a2753c03e4408f96f0 Mon Sep 17 00:00:00 2001 From: nishchaykarle Date: Fri, 16 Feb 2024 18:22:53 -0600 Subject: [PATCH] update tests --- tests/test_correctness.py | 72 +++++++++++++++++++++------------------ 1 file changed, 39 insertions(+), 33 deletions(-) diff --git a/tests/test_correctness.py b/tests/test_correctness.py index 66fb537..69e410d 100644 --- a/tests/test_correctness.py +++ b/tests/test_correctness.py @@ -14,39 +14,39 @@ test_report_files = os.path.join(os.getcwd(), "tests", "test-reports") -def test_find() -> None: - """Test for the find CWL CommandLineTool.""" - # Test 1 - find( - dir=".", - maxdepth=3, - name="*.cwl", - redirect_to_file=os.path.join(test_runtime_files, "find_stdout_1.txt"), - output_file=File(os.path.join(test_runtime_files, "find_stdout_1.txt")), - ).result() - - # Test 2 - find( - dir=".", - name="*.cwl", - redirect_to_file=os.path.join(test_runtime_files, "find_stdout_2.txt"), - output_file=File(os.path.join(test_runtime_files, "find_stdout_2.txt")), - ).result() - - -def test_touch() -> None: - """Test for the touch CWL CommandLineTool.""" - # Test 1 - touch( - filenames=[ - os.path.join(test_runtime_files, "touch1.txt"), - os.path.join(test_runtime_files, "touch2.txt"), - ], - output_files=[ - File(os.path.join(test_runtime_files, "touch1.txt")), - File(os.path.join(test_runtime_files, "touch2.txt")), - ], - ).result() +# def test_find() -> None: +# """Test for the find CWL CommandLineTool.""" +# # Test 1 +# find( +# dir=".", +# maxdepth=3, +# name="*.cwl", +# redirect_to_file=os.path.join(test_runtime_files, "find_stdout_1.txt"), +# output_file=File(os.path.join(test_runtime_files, "find_stdout_1.txt")), +# ).result() + +# # Test 2 +# find( +# dir=".", +# name="*.cwl", +# redirect_to_file=os.path.join(test_runtime_files, "find_stdout_2.txt"), +# output_file=File(os.path.join(test_runtime_files, "find_stdout_2.txt")), +# ).result() + + +# def test_touch() -> None: +# """Test for the touch CWL CommandLineTool.""" +# # Test 1 +# touch( +# filenames=[ +# os.path.join(test_runtime_files, "touch1.txt"), +# os.path.join(test_runtime_files, "touch2.txt"), +# ], +# output_files=[ +# File(os.path.join(test_runtime_files, "touch1.txt")), +# File(os.path.join(test_runtime_files, "touch2.txt")), +# ], +# ).result() def test_word_count() -> None: @@ -104,3 +104,9 @@ def cat_cat_workflow(): def test_workflows() -> None: """Test for various workflows.""" cat_cat_workflow() + + +def test_delete_runtime_files() -> None: + """Delete the runtime files generated by the tests.""" + for file in os.listdir(test_runtime_files): + os.remove(os.path.join(test_runtime_files, file))