Skip to content

Commit ebcd7d1

Browse files
committed
Use pytest-asyncio in auto mode
Remove overly genereric `pytestmark=pytest.mark.asyncio` causing lots of warning noise
1 parent e6cd4fd commit ebcd7d1

15 files changed

+1
-30
lines changed

tests/test_asyncio/test_bloom.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
from redis.exceptions import ModuleError, RedisError
55
from redis.utils import HIREDIS_AVAILABLE
66

7-
pytestmark = pytest.mark.asyncio
8-
97

108
def intlist(obj):
119
return [int(v) for v in obj]

tests/test_asyncio/test_cluster.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@
3939
skip_unless_arch_bits,
4040
)
4141

42-
pytestmark = pytest.mark.asyncio
43-
4442
default_host = "127.0.0.1"
4543
default_port = 7000
4644
default_cluster_slots = [

tests/test_asyncio/test_commands.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@
2727
REDIS_6_VERSION = "5.9.0"
2828

2929

30-
pytestmark = pytest.mark.asyncio
31-
32-
3330
@pytest_asyncio.fixture()
3431
async def slowlog(r: redis.Redis, event_loop):
3532
current_config = await r.config_get()

tests/test_asyncio/test_connection.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010

1111
from .compat import mock
1212

13-
pytestmark = pytest.mark.asyncio
14-
1513

1614
@pytest.mark.onlynoncluster
1715
@pytest.mark.skipif(HIREDIS_AVAILABLE, reason="PythonParser only")

tests/test_asyncio/test_connection_pool.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
from .compat import mock
1818
from .test_pubsub import wait_for_message
1919

20-
pytestmark = pytest.mark.asyncio
21-
2220

2321
@pytest.mark.onlynoncluster
2422
class TestRedisAutoReleaseConnectionPool:

tests/test_asyncio/test_encoding.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
import redis.asyncio as redis
1111
from redis.exceptions import DataError
1212

13-
pytestmark = pytest.mark.asyncio
14-
1513

1614
@pytest.mark.onlynoncluster
1715
class TestEncoding:

tests/test_asyncio/test_json.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
from redis.commands.json.path import Path
66
from tests.conftest import skip_ifmodversion_lt
77

8-
pytestmark = pytest.mark.asyncio
9-
108

119
@pytest.mark.redismod
1210
async def test_json_setbinarykey(modclient: redis.Redis):

tests/test_asyncio/test_lock.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
from redis.asyncio.lock import Lock
1212
from redis.exceptions import LockError, LockNotOwnedError
1313

14-
pytestmark = pytest.mark.asyncio
15-
1614

1715
@pytest.mark.onlynoncluster
1816
class TestLock:

tests/test_asyncio/test_monitor.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
from .conftest import wait_for_command
66

7-
pytestmark = pytest.mark.asyncio
8-
97

108
@pytest.mark.onlynoncluster
119
class TestMonitor:

tests/test_asyncio/test_pipeline.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55

66
from .conftest import wait_for_command
77

8-
pytestmark = pytest.mark.asyncio
9-
108

119
class TestPipeline:
1210
@pytest.mark.onlynoncluster

0 commit comments

Comments
 (0)