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: remove redundant tests #3642

Merged
merged 5 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/test-fakeredis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ jobs:
- name: Run tests
working-directory: tests/fakeredis
run: |
poetry run pytest test/ --ignore test/test_hypothesis.py --ignore test/test_json/ \
poetry run pytest test/ \
--ignore test/test_hypothesis.py \
--ignore test/test_json/ \
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks, can you please add ignore test_bitmap_commands.py and
test_geo_commands.py (will save me a PR) ?
these are not very urgent to fix.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

test_geo_commands.py was not in the ignore list - is there another point where it is marked to be ignored?

Added test_bitmap_commands.py

Copy link
Collaborator

Choose a reason for hiding this comment

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

I meant to add them here as --ignore ... because they are failing on Dragonfly. I think you removed test_bitmap_commands instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done :)
I thought you meant add them to run, not add them to the ignore list.

--ignore test_bitmap_commands.py \
--junit-xml=results-tests.xml --html=report-tests.html -v
continue-on-error: true # For now to mark the flow as successful
Expand Down
147 changes: 0 additions & 147 deletions tests/fakeredis/test/test_extract_args.py

This file was deleted.

16 changes: 0 additions & 16 deletions tests/fakeredis/test/test_general.py

This file was deleted.

16 changes: 0 additions & 16 deletions tests/fakeredis/test/test_mock.py

This file was deleted.

11 changes: 2 additions & 9 deletions tests/fakeredis/test/test_sortedset_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,13 @@
import pytest
import redis
import redis.client
from packaging.version import Version

REDIS_VERSION = Version(redis.__version__)


def round_str(x):
assert isinstance(x, bytes)
return round(float(x))


def zincrby(r, key, amount, value):
return r.zincrby(key, amount, value)


def test_zpopmin(r: redis.Redis):
r.zadd("foo", {"one": 1})
r.zadd("foo", {"two": 2})
Expand Down Expand Up @@ -215,14 +208,14 @@ def test_zcount_wrong_type(r: redis.Redis):

def test_zincrby(r: redis.Redis):
r.zadd("foo", {"one": 1})
assert zincrby(r, "foo", 10, "one") == 11
assert r.zincrby("foo", 10, "one") == 11
assert r.zrange("foo", 0, -1, withscores=True) == [(b"one", 11)]


def test_zincrby_wrong_type(r: redis.Redis):
r.sadd("foo", "bar")
with pytest.raises(redis.ResponseError):
zincrby(r, "foo", 10, "one")
r.zincrby("foo", 10, "one")


def test_zrange_descending(r: redis.Redis):
Expand Down
Loading