Skip to content

Commit

Permalink
updates md5 and file extensions teests
Browse files Browse the repository at this point in the history
  • Loading branch information
BWMac committed May 7, 2024
1 parent d922437 commit 0aaba30
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
4 changes: 1 addition & 3 deletions src/dcqc/suites/suites.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@
from dcqc.suites.suite_abc import SuiteABC


# TODO: Consider moving the filetype-test association logic
# to the file types
class FileSuite(SuiteABC):
file_type = FileType.get_file_type("*")
# add_tests = (tests.FileExtensionTest, tests.Md5ChecksumTest)
add_tests = (tests.FileExtensionTest, tests.Md5ChecksumTest)


class JsonSuite(FileSuite):
Expand Down
1 change: 1 addition & 0 deletions src/dcqc/tests/file_extension_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ def compute_status(self) -> TestStatus:
file_extensions = file_type.file_extensions
if not file.name.endswith(file_extensions):
status = TestStatus.FAIL
self.failure_reason = f"{file.name} does not have one of the expected extensions ({file_extensions}) for file type: {file_type.name}"
break
return status
1 change: 1 addition & 0 deletions src/dcqc/tests/md5_checksum_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ def compute_status(self) -> TestStatus:
status = TestStatus.PASS
else:
status = TestStatus.FAIL
self.failure_reason = "Actual MD5 does not match provided value"
return status

def _compute_md5_checksum(self, path: Path) -> str:
Expand Down

0 comments on commit 0aaba30

Please sign in to comment.