-
-
Notifications
You must be signed in to change notification settings - Fork 390
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
Add __eq__ method to Q to more easily test dynamically-built queries #1506
Conversation
Thanks! Please update changelog. |
Done |
CHANGELOG.rst
Outdated
------ | ||
|
||
Added | ||
|
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.
please add ^^^^^
here
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.
I do not get it. Could you please provide an example and also document how to add changelog?
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.
Done
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! Just one thing, please add in 0.20.1
section.
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.
Done.
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.
I hope it is okay now.
c271747
to
8beb30a
Compare
CHANGELOG.rst
Outdated
@@ -6,6 +6,12 @@ Changelog | |||
|
|||
.. rst-class:: emphasize-children | |||
|
|||
0.20.1 |
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.
This should be under 0.20
section
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.
Done.
d929585
to
698afe2
Compare
Add
__eq__
method to Q to more easily test dynamically-built queriesDescription
When a query is built dynamically it is needed to be tested if it is built correctly. As query is built in a tree it is too hard to test it.
Motivation and Context
Lets say the following query is built dynamically
Currently to test it, the following code needs to be written which is already too complicated with just three Q objects.
With this feature, the result will be checked against the expected value
How Has This Been Tested?
I added tests for various queries including basic,
or
,and
, combination ofand
andor
.Checklist: