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

test: add remove_files tests #22

Merged
merged 8 commits into from
Aug 7, 2024
Merged

test: add remove_files tests #22

merged 8 commits into from
Aug 7, 2024

Conversation

athith-g
Copy link
Collaborator

@athith-g athith-g commented Jul 29, 2024

Adds tests for remove_files

Summary by Sourcery

This pull request introduces new tests for the remove_files function, ensuring its correct behavior in various scenarios including handling empty directories and non-existent directories.

  • Tests:
    • Added tests for the remove_files function to ensure files in a directory are removed successfully.
    • Included tests to verify no errors are raised when an empty directory is passed to remove_files.
    • Added a test to check that a ValueError is raised when a non-existent directory is passed to remove_files.

Copy link

sourcery-ai bot commented Jul 29, 2024

Reviewer's Guide by Sourcery

This pull request adds tests for the remove_files function in the decryption module. The changes include adding a new pytest fixture for creating temporary files, removing a duplicate fixture definition, and adding a new test class TestRemoveFiles with tests for various scenarios such as removing files, handling empty directories, and non-existent directories.

File-Level Changes

Files Changes
tests/decryption/test_decrypt.py Added tests for the remove_files function, including setup for temporary files, and removed duplicate fixture definition.

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @athith-g - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟡 Testing: 2 issues found
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

tests/decryption/test_decrypt.py Show resolved Hide resolved
tests/decryption/test_decrypt.py Show resolved Hide resolved
Copy link
Collaborator

@jvkersch jvkersch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just one small comment.

tests/decryption/test_decrypt.py Outdated Show resolved Hide resolved
@athith-g athith-g requested a review from jvkersch July 30, 2024 22:03
Copy link
Member

@uniqueg uniqueg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests are great, but please address the single comment 🙏

tests/decryption/test_decrypt.py Outdated Show resolved Hide resolved
@athith-g athith-g requested a review from uniqueg August 6, 2024 15:53
@athith-g athith-g merged commit dd74dc9 into main Aug 7, 2024
1 check passed
@athith-g athith-g deleted the add_remove_tests branch August 7, 2024 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants