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

Test test_get_moveable_keys was broken #2411

Merged
merged 5 commits into from
Oct 25, 2022
Merged

Conversation

sobolevn
Copy link
Contributor

@sobolevn sobolevn commented Oct 8, 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?

Description of change

This test was not checking anything, because .sort() always returns None. It was checking that None == None.

See:

>>> assert [3, 1, 2].sort() is None
>>> sorted([3, 1, 2])
[1, 2, 3]

@codecov-commenter
Copy link

codecov-commenter commented Oct 8, 2022

Codecov Report

Base: 78.91% // Head: 92.04% // Increases project coverage by +13.13% 🎉

Coverage data is based on head (96baf77) compared to base (4200d54).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #2411       +/-   ##
===========================================
+ Coverage   78.91%   92.04%   +13.13%     
===========================================
  Files         110      110               
  Lines       28735    28735               
===========================================
+ Hits        22675    26448     +3773     
+ Misses       6060     2287     -3773     
Impacted Files Coverage Δ
tests/test_command_parser.py 93.87% <100.00%> (ø)
tests/test_asyncio/test_search.py 98.26% <0.00%> (-0.35%) ⬇️
redis/commands/core.py 82.17% <0.00%> (+0.16%) ⬆️
redis/asyncio/client.py 92.22% <0.00%> (+0.17%) ⬆️
tests/test_commands.py 89.92% <0.00%> (+0.18%) ⬆️
tests/test_json.py 100.00% <0.00%> (+0.19%) ⬆️
tests/test_asyncio/test_json.py 100.00% <0.00%> (+0.24%) ⬆️
redis/connection.py 86.30% <0.00%> (+0.48%) ⬆️
tests/test_lock.py 100.00% <0.00%> (+0.49%) ⬆️
tests/test_asyncio/test_lock.py 100.00% <0.00%> (+0.52%) ⬆️
... and 23 more

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

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@dvora-h dvora-h added the maintenance Maintenance (CI, Releases, etc) label Oct 25, 2022
Copy link
Collaborator

@dvora-h dvora-h left a comment

Choose a reason for hiding this comment

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

Nice catch!

@dvora-h dvora-h merged commit 1c2461d into redis:master Oct 25, 2022
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