Skip to content
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

Search test - Ignore order of the items in the response #2322

Merged
merged 2 commits into from
Aug 4, 2022

Conversation

dvora-h
Copy link
Collaborator

@dvora-h dvora-h commented Aug 4, 2022

Pull Request check-list

Please make sure to review and check all of these items:

  • Does $ tox pass with this change (including linting)?
  • Do the CI tests pass with this change (enable it first in your forked repo and wait for the github action build to finish)?
  • Is the new or changed code fully tested?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • Is there an example added to the examples folder (if applicable)?
  • Was the change added to CHANGES file?

NOTE: these things are not required to open a PR and can be done
afterwards / while the PR is open.

Description of change

Please provide a description of the change here.

@dvora-h dvora-h added the maintenance Maintenance (CI, Releases, etc) label Aug 4, 2022
@dvora-h dvora-h requested a review from chayim August 4, 2022 10:18
@@ -965,7 +965,7 @@ def test_aggregations_groupby(client):

res = client.ft().aggregate(req).rows[0]
assert res[1] == "redis"
assert res[3] == ["RediSearch", "RedisAI", "RedisJson"]
assert set(res[3]) == {"RediSearch", "RedisAI", "RedisJson"}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So much smarter than what I was thinking. But, I'm not convinced it always works - in older python versions.

Instead can we do an assert on each item in res[3]?

@codecov-commenter
Copy link

codecov-commenter commented Aug 4, 2022

Codecov Report

Merging #2322 (5a83cbc) into master (9901c79) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #2322      +/-   ##
==========================================
+ Coverage   92.15%   92.17%   +0.01%     
==========================================
  Files         111      111              
  Lines       28659    28702      +43     
==========================================
+ Hits        26412    26456      +44     
+ Misses       2247     2246       -1     
Impacted Files Coverage Δ
tests/test_asyncio/test_search.py 98.71% <100.00%> (+0.36%) ⬆️
tests/test_search.py 99.22% <100.00%> (ø)
tests/conftest.py 84.94% <0.00%> (-0.78%) ⬇️
redis/commands/bf/commands.py 98.35% <0.00%> (-0.52%) ⬇️
tests/test_bloom.py 99.59% <0.00%> (+0.01%) ⬆️
tests/test_asyncio/test_bloom.py 99.57% <0.00%> (+0.02%) ⬆️
redis/commands/search/commands.py 89.34% <0.00%> (+0.26%) ⬆️
tests/test_asyncio/compat.py 100.00% <0.00%> (+9.09%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@dvora-h dvora-h merged commit 85825b8 into redis:master Aug 4, 2022
dvora-h added a commit that referenced this pull request Nov 21, 2022
@dvora-h dvora-h deleted the search-test branch June 18, 2023 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Maintenance (CI, Releases, etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants