Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit test for checking supported file formats #28

Closed
oliver-pham opened this issue Nov 17, 2021 · 0 comments · Fixed by #30
Closed

Unit test for checking supported file formats #28

oliver-pham opened this issue Nov 17, 2021 · 0 comments · Fixed by #30
Labels
good first issue Good for newcomers testing Automation test

Comments

@oliver-pham
Copy link
Owner

We need to make sure this function:

silkie/silkie/utils.py

Lines 27 to 29 in 65024a5

def is_filetype_supported(file_path: str) -> bool:
file_extension = Path(file_path).suffix
return definitions.SUPORTED_FILE_EXTENSIONS.count(file_extension) > 0

  • return True if the file has one of the supported file extensions.
  • return False if the file extension is not supported, invalid file path, or a path to a directory
  • error handling for "bad" values (e.g. empty string, None) (this may need a fix)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers testing Automation test
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant