diff --git a/setup.cfg b/setup.cfg index fd799b4..3888deb 100644 --- a/setup.cfg +++ b/setup.cfg @@ -2,6 +2,7 @@ addopts = -p no:django testpaths = tests asyncio_mode = auto +timeout = 10 [flake8] exclude = venv/*,tox/*,specs/*,build/* diff --git a/setup.py b/setup.py index cffb682..3160287 100644 --- a/setup.py +++ b/setup.py @@ -13,6 +13,7 @@ "pytest", "pytest-asyncio", "async-timeout", + "pytest-timeout", ] diff --git a/tests/test_core.py b/tests/test_core.py index 1316180..92c7f6a 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -499,6 +499,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): """ @@ -631,6 +637,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 diff --git a/tests/test_sentinel.py b/tests/test_sentinel.py index 0a0fc2f..4fb7de5 100644 --- a/tests/test_sentinel.py +++ b/tests/test_sentinel.py @@ -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): """ @@ -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