-
Notifications
You must be signed in to change notification settings - Fork 544
fix: enhance test_checkers to cover new situations #4942
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking a look at this issue, @22f1001635! Could you please alter the test logic as I've described, to make sure we're thoroughly testing the new functionality?
fc0983c
to
5a831bc
Compare
96e8e11
to
c43d13b
Compare
c43d13b
to
8094c46
Compare
hi @stvml , i have got rid from re.compile and have made the tests easier to understand avoiding repeated assignments
I was expecting a empty list for no version pattern that came out fine Duplicate Versions:
AssertionError: Mixed valid and ignored versions failed test/test_checkers.py:182: AssertionError |
It's not clear to me that this is ready yet, but it looks safe to run the CI so I'll kick that off now. |
Okay, a couple of points of feedback here:
From this and your previous commits, my guess is that you're leaning heavily on an AI code assistant to write these patches. That's fine, those tools can be really helpful, but I think your contributions would benefit from a bit more human touch to make sure everything makes sense. LLMs are great at writing syntactically correct snippets of code, but they aren't as good yet at making changes that are consistent and readable in the context of a larger codebase. Thanks for working on this through all the back and forth! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my comments above. Tests will also have to pass, obviously :)
Hey @stvml , That said, in my last commit, I took matters into my own hands, found some issues, and flagged them right away. I completely understand the importance of maintaining consistency and correctness, and I assure you this won’t happen again. To be honest, the past week has been incredibly busy for me due to a combination of exams and work, which has made it hard to dedicate as much time as I’d like. I’ve taken on several issues in the repository, but if my schedule doesn’t ease up in the next couple of days, I might drop 1-2 and hand them over to someone as my workload will be heavy for about two more weeks, but after that, I should be back to contributing more effectively. |
de82a87
to
5bbb69a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple of comment fixes, otherwise LGTM!
Understood! No worries at all about the time needed on my end, this patch needed to be written and we ultimately have the same goal of improving this open-source project. |
4127d7e
to
5ab2da6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be the last change here. A couple of test failures: the sqlite
checker in sqlite.py
overrides get_versions
to do some custom version mapping logic. Looks like it's still using append
, which fails once we made the change to a set
...
70f9ba0
to
23ee703
Compare
I have made the requested changes and all tests and workflows pass on the branch |
Summary
This PR introduces new test cases in
test/test_checkers.py
to confirm that the MyFakeChecker class can detect multiple versions of a single product in a file correctly after the changes introduced in patch #4911.Changes Introduced
New Test Cases:
Test Multiple Versions Detection:
Test Ignored Versions:
Test Mixed Versions:
Checklist
pytest test/test_checkers.py
confirm new test cases pass correctly.Steps to Test
Run
pytest test/test_checkers.py
to verify:Related Issues
Fixes #4940
Additional Notes