Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
NishchayKarle committed Feb 17, 2024
1 parent f33494c commit c505a4d
Showing 1 changed file with 39 additions and 33 deletions.
72 changes: 39 additions & 33 deletions tests/test_correctness.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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))

0 comments on commit c505a4d

Please sign in to comment.