Remove duplicate file-mocking boilerplate in loader tests#122
Merged
garlontas merged 5 commits intobugfix/#95/loading-big-data-files-not-safefrom Apr 13, 2026
Conversation
Agent-Logs-Url: https://github.com/pickwicksoft/pystreamapi/sessions/cca5b91e-bcec-4753-ae80-f54793446cc8 Co-authored-by: garlontas <70283087+garlontas@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
garlontas
April 13, 2026 10:14
View session
Reviewer's GuideRefactors loader tests to centralize file-mocking logic in a new LoaderTestBase mixin, which provides a shared mock_file context manager, and updates all loader test classes to use it alongside TestCase so LoaderTestBase itself is no longer collected as a test. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
…estCase directly Agent-Logs-Url: https://github.com/pickwicksoft/pystreamapi/sessions/81262c2e-0844-405a-97e9-8e4664d8a36a Co-authored-by: garlontas <70283087+garlontas@users.noreply.github.com>
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Since
LoaderTestBaseis intended purely as a mixin, consider renaming it to something likeLoaderTestMixinto better communicate its role and avoid confusion with realTestCasesubclasses. - You could add simple type hints to
mock_file(e.g.,content: str,exists: bool,is_file: bool) to make its expected usage clearer across all loader tests.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Since `LoaderTestBase` is intended purely as a mixin, consider renaming it to something like `LoaderTestMixin` to better communicate its role and avoid confusion with real `TestCase` subclasses.
- You could add simple type hints to `mock_file` (e.g., `content: str`, `exists: bool`, `is_file: bool`) to make its expected usage clearer across all loader tests.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
…tatements Agent-Logs-Url: https://github.com/pickwicksoft/pystreamapi/sessions/a0670a1e-f111-4780-9ca9-f3c7acb1057e Co-authored-by: garlontas <70283087+garlontas@users.noreply.github.com>
Copilot stopped work on behalf of
garlontas due to an error
April 13, 2026 10:26
|
fbbe279
into
bugfix/#95/loading-big-data-files-not-safe
10 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



with (cm1, cm2, cm3):with nestedwithstatements infile_test.pyto fix pylint E1129 (not-context-manager)