You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Raise errors for inputs that would cause blank outputs; handle length in CLI for variable length digest algorithms (#16)
* Raise errors for inputs that would cause blank outputs with custom exceptions for blank output errors and invalid length param use, with testing
* Add length parameter option for certain algs
* Refactor hash tests with parametrize
---------
Co-authored-by: Elizabeth Campolongo <[email protected]>
> Note: The available algorithms are determined by those available to `hashlib` and may vary depending on your system and OpenSSL version, so the set shown on your system with `sum-buddy -h` may be different from above. At a minimum, it should include: `{blake2s, blake2b, md5, sha1, sha224, sha256, sha384, sha512, sha3_224, sha3_256, sha3_384, sha3_512, shake_128, shake_256}`, which is given by `hashlib.algorithms_guaranteed`.
Generate a CSV file with the filepath, filename, and checksum of all files in the input directory according to patterns to ignore. Checksum column is labeled by the selected algorithm (e.g., 'md5' or 'sha256').
message=f"The directory {input_directory} and subdirectories (if any) contain no files. \nPlease provide a directory with files."
4
+
super().__init__(message)
5
+
6
+
classNoFilesAfterFilteringError(Exception):
7
+
def__init__(self, input_directory, ignore_file):
8
+
message=f"The directory {input_directory} contains files, but all are filtered out. \nCheck patterns in your {ignore_file} file and/or hidden files settings."
0 commit comments