Skip to content

Commit

Permalink
added checksum test invalid file
Browse files Browse the repository at this point in the history
  • Loading branch information
SilenZcience committed Dec 13, 2024
1 parent 285ce79 commit a8a2444
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cat_win/tests/src/service/test_checksum.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ def test_checksum_colored(self):
expected_output += 'bd82ce9e8527412ce2cc8355a391a1Y\n'
self.assertEqual(get_checksum_from_file(test_file_path, ['X', 'Y']), expected_output)

def test_checksum_invalid_file(self):
self.assertEqual(get_checksum_from_file('randomFileThatHopefullyDoesNotExistWithWeirdCharsForSafety*!?\\/:<>|'), 'OSError')

def test_print_checksum(self):
expected_output = f"XChecksum of '{test_file_path}':Y\n"
expected_output += '\tXCRC32: C7222F64Y\n'
Expand Down

0 comments on commit a8a2444

Please sign in to comment.