@@ -28,14 +28,14 @@ async def r(self, create_redis):
28
28
yield redis
29
29
await redis .script_flush ()
30
30
31
- @pytest .mark .asyncio (forbid_global_loop = True )
31
+ @pytest .mark .asyncio ()
32
32
async def test_eval (self , r ):
33
33
await r .flushdb ()
34
34
await r .set ("a" , 2 )
35
35
# 2 * 3 == 6
36
36
assert await r .eval (multiply_script , 1 , "a" , 3 ) == 6
37
37
38
- @pytest .mark .asyncio (forbid_global_loop = True )
38
+ @pytest .mark .asyncio ()
39
39
@skip_if_server_version_lt ("6.2.0" )
40
40
async def test_script_flush (self , r ):
41
41
await r .set ("a" , 2 )
@@ -55,14 +55,14 @@ async def test_script_flush(self, r):
55
55
await r .script_load (multiply_script )
56
56
await r .script_flush ("NOTREAL" )
57
57
58
- @pytest .mark .asyncio (forbid_global_loop = True )
58
+ @pytest .mark .asyncio ()
59
59
async def test_evalsha (self , r ):
60
60
await r .set ("a" , 2 )
61
61
sha = await r .script_load (multiply_script )
62
62
# 2 * 3 == 6
63
63
assert await r .evalsha (sha , 1 , "a" , 3 ) == 6
64
64
65
- @pytest .mark .asyncio (forbid_global_loop = True )
65
+ @pytest .mark .asyncio ()
66
66
async def test_evalsha_script_not_loaded (self , r ):
67
67
await r .set ("a" , 2 )
68
68
sha = await r .script_load (multiply_script )
@@ -71,7 +71,7 @@ async def test_evalsha_script_not_loaded(self, r):
71
71
with pytest .raises (exceptions .NoScriptError ):
72
72
await r .evalsha (sha , 1 , "a" , 3 )
73
73
74
- @pytest .mark .asyncio (forbid_global_loop = True )
74
+ @pytest .mark .asyncio ()
75
75
async def test_script_loading (self , r ):
76
76
# get the sha, then clear the cache
77
77
sha = await r .script_load (multiply_script )
@@ -80,7 +80,7 @@ async def test_script_loading(self, r):
80
80
await r .script_load (multiply_script )
81
81
assert await r .script_exists (sha ) == [True ]
82
82
83
- @pytest .mark .asyncio (forbid_global_loop = True )
83
+ @pytest .mark .asyncio ()
84
84
async def test_script_object (self , r ):
85
85
await r .script_flush ()
86
86
await r .set ("a" , 2 )
@@ -97,7 +97,7 @@ async def test_script_object(self, r):
97
97
# Test first evalsha block
98
98
assert await multiply (keys = ["a" ], args = [3 ]) == 6
99
99
100
- @pytest .mark .asyncio (forbid_global_loop = True )
100
+ @pytest .mark .asyncio ()
101
101
async def test_script_object_in_pipeline (self , r ):
102
102
await r .script_flush ()
103
103
multiply = r .register_script (multiply_script )
@@ -127,7 +127,7 @@ async def test_script_object_in_pipeline(self, r):
127
127
assert await pipe .execute () == [True , b"2" , 6 ]
128
128
assert await r .script_exists (multiply .sha ) == [True ]
129
129
130
- @pytest .mark .asyncio (forbid_global_loop = True )
130
+ @pytest .mark .asyncio ()
131
131
async def test_eval_msgpack_pipeline_error_in_lua (self , r ):
132
132
msgpack_hello = r .register_script (msgpack_hello_script )
133
133
assert msgpack_hello .sha
0 commit comments