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

tests: reuse centrally defined input variables #28

Merged
merged 1 commit into from
Aug 19, 2024

Conversation

athith-g
Copy link
Collaborator

@athith-g athith-g commented Aug 19, 2024

Use INPUT_TEXT and INPUT_DIR from utils.py instead of redefining them.

Summary by Sourcery

Refactor test task bodies and test tasks to utilize input variables from utils.py, reducing redundancy and improving maintainability.

Enhancements:

  • Refactor tests to use INPUT_DIR and INPUT_TEXT from utils.py instead of redefining them locally.

Copy link

sourcery-ai bot commented Aug 19, 2024

Reviewer's Guide by Sourcery

This pull request refactors the code to use input variables from utils.py instead of redefining them. The changes primarily affect the file paths used in task bodies and test files, improving code consistency and reducing duplication.

File-Level Changes

Files Changes
tests/tasks/task_bodies.py
tests/tasks/test_tasks.py
Removed local definitions of DIR, input_dir, and INPUT_TEXT, replacing them with imports from utils.py
tests/tasks/task_bodies.py Updated all file path references to use INPUT_DIR instead of input_dir
tests/tasks/task_bodies.py Removed unused import of Path from pathlib
tests/tasks/test_tasks.py Updated import statement in test_tasks.py to include INPUT_TEXT from utils

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: all looks good
  • 🟢 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/tasks/task_bodies.py Show resolved Hide resolved
tests/tasks/test_tasks.py Show resolved Hide resolved
@uniqueg uniqueg changed the title refactor: use utils input variables tests: reuse centrally defined input variables Aug 19, 2024
@athith-g athith-g merged commit 41ba2a4 into main Aug 19, 2024
1 check passed
@athith-g athith-g deleted the refactor_input_paths branch August 19, 2024 15:30
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.

2 participants