-
-
Notifications
You must be signed in to change notification settings - Fork 117
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
fix: Do not try to call an ordering object's order
method if it is not a decorated method
#584
Conversation
…not a decorated method Fix #581
Reviewer's Guide by SourceryThis pull request addresses issue #581 by adding tests to ensure that an ordering object's File-Level Changes
Tips
|
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.
Hey @bellini666 - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟡 Testing: 4 issues found
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.
mock_order_method.assert_not_called() | ||
|
||
|
||
def test_order_field_not_called(mocker: MockFixture): |
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.
suggestion (testing): Test name could be more descriptive.
Consider renaming the test to something like test_order_field_not_called_as_method
to make it clearer that the test is ensuring the field is not called as a method.
def test_order_field_not_called(mocker: MockFixture): | |
def test_order_field_not_called_as_method(mocker: MockFixture): |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #584 +/- ##
==========================================
- Coverage 88.90% 88.79% -0.11%
==========================================
Files 41 41
Lines 3595 3597 +2
==========================================
- Hits 3196 3194 -2
- Misses 399 403 +4 ☔ View full report in Codecov by Sentry. |
Fix #581
Summary by Sourcery
This pull request fixes a bug where the
order
method of an ordering object was incorrectly called even if it was not decorated. It also adds tests to verify that theorder
method is not called when it is not decorated and that an order field is not mistakenly called as a method.order
method of an ordering object was called even if it was not a decorated method.order
method is not called when it is not decorated.