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

Redis compat: xfail problem test cases and update redis-py. #356

Merged
merged 2 commits into from
Mar 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
addopts = -p no:django
testpaths = tests
asyncio_mode = auto
timeout = 10

[flake8]
exclude = venv/*,tox/*,specs/*,build/*
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"pytest",
"pytest-asyncio",
"async-timeout",
"pytest-timeout",
]


Expand All @@ -30,7 +31,7 @@
include_package_data=True,
python_requires=">=3.7",
install_requires=[
"redis==4.3.5",
"redis>=4.5.3",
"msgpack~=1.0",
"asgiref>=3.2.10,<4",
"channels",
Expand Down
7 changes: 7 additions & 0 deletions tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,12 @@ def test_repeated_group_send_with_async_to_sync(channel_layer):
pytest.fail(f"repeated async_to_sync wrapped group_send calls raised {exc}")


@pytest.mark.xfail(
reason="""
Fails with error in redis-py: int() argument must be a string, a bytes-like
object or a real number, not 'NoneType'. Refs: #348
"""
)
@pytest.mark.asyncio
async def test_receive_cancel(channel_layer):
"""
Expand Down Expand Up @@ -551,6 +557,7 @@ async def test_message_expiry__group_send(channel_layer):
await channel_layer.receive(channel_name)


@pytest.mark.xfail(reason="Fails with timeout. Refs: #348")
@pytest.mark.asyncio
async def test_message_expiry__group_send__one_channel_expires_message(channel_layer):
expiry = 3
Expand Down
7 changes: 7 additions & 0 deletions tests/test_sentinel.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,12 @@ async def test_group_send_capacity_multiple_channels(channel_layer, caplog):
)


@pytest.mark.xfail(
reason="""
Fails with error in redis-py: int() argument must be a string, a bytes-like
object or a real number, not 'NoneType'. Refs: #348
"""
)
@pytest.mark.asyncio
async def test_receive_cancel(channel_layer):
"""
Expand Down Expand Up @@ -593,6 +599,7 @@ async def test_message_expiry__group_send(channel_layer):
await channel_layer.receive(channel_name)


@pytest.mark.xfail(reason="Fails with timeout. Refs: #348")
@pytest.mark.asyncio
async def test_message_expiry__group_send__one_channel_expires_message(channel_layer):
expiry = 3
Expand Down