-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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 extra tests for GEO search #3244
Conversation
Add more tests for GEO search, to cover the query operators `within`, `contains`, `intersects` and `disjoint`, for POINT and POLYGON, i.e. the currently supported shapes and operators.
assert result.total == len(expected_doc_ids) | ||
else: | ||
assert set([doc["id"] for doc in result["results"]]) == set(expected_doc_ids) | ||
assert result["total_results"] == len(expected_doc_ids) |
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.
So for RESP2 the response type is an object and for RESP3 array?
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.
Yes, exactly. The object is decoded from the RESP2 style response, which is nested lists.
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.
While checking this, I found one existing test that was not asserting well for RESP3, I updated it. Most probably the test does not even run with RESP3, since there were no failures in the past. A thing to check, but I'll leave that for a separate PR.
Add more tests for GEO search, to cover the query operators `within`, `contains`, `intersects` and `disjoint`, for POINT and POLYGON, i.e. the currently supported shapes and operators.
Add more tests for GEO search, to cover the query operators `within`, `contains`, `intersects` and `disjoint`, for POINT and POLYGON, i.e. the currently supported shapes and operators.
Add more tests for GEO search, to cover the query operators `within`, `contains`, `intersects` and `disjoint`, for POINT and POLYGON, i.e. the currently supported shapes and operators.
Add more tests for GEO search, to cover the query operators `within`, `contains`, `intersects` and `disjoint`, for POINT and POLYGON, i.e. the currently supported shapes and operators.
Add more tests for GEO search, to cover the query operators `within`, `contains`, `intersects` and `disjoint`, for POINT and POLYGON, i.e. the currently supported shapes and operators.
Add more tests for GEO search, to cover the query operators `within`, `contains`, `intersects` and `disjoint`, for POINT and POLYGON, i.e. the currently supported shapes and operators.
Pull Request check-list
Please make sure to review and check all of these items:
NOTE: these things are not required to open a PR and can be done
afterwards / while the PR is open.
Description of change
Add more tests for GEO search, to cover the query operators
within
,contains
,intersects
anddisjoint
, for POINT and POLYGON, i.e. the currently supported shapes and operators.