11
11
@pytest .mark .parametrize ("lock_type" , [AsyncFileLock , AsyncSoftFileLock ])
12
12
@pytest .mark .parametrize ("path_type" , [str , PurePath , Path ])
13
13
@pytest .mark .parametrize ("filename" , ["a" , "new/b" , "new2/new3/c" ])
14
- @pytest .mark .asyncio ()
14
+ @pytest .mark .asyncio
15
15
async def test_simple (
16
16
lock_type : type [BaseAsyncFileLock ],
17
17
path_type : type [str | Path ],
@@ -43,7 +43,7 @@ async def test_simple(
43
43
@pytest .mark .parametrize ("lock_type" , [AsyncFileLock , AsyncSoftFileLock ])
44
44
@pytest .mark .parametrize ("path_type" , [str , PurePath , Path ])
45
45
@pytest .mark .parametrize ("filename" , ["a" , "new/b" , "new2/new3/c" ])
46
- @pytest .mark .asyncio ()
46
+ @pytest .mark .asyncio
47
47
async def test_acquire (
48
48
lock_type : type [BaseAsyncFileLock ],
49
49
path_type : type [str | Path ],
@@ -73,7 +73,7 @@ async def test_acquire(
73
73
74
74
75
75
@pytest .mark .parametrize ("lock_type" , [AsyncFileLock , AsyncSoftFileLock ])
76
- @pytest .mark .asyncio ()
76
+ @pytest .mark .asyncio
77
77
async def test_non_blocking (lock_type : type [BaseAsyncFileLock ], tmp_path : Path ) -> None :
78
78
# raises Timeout error when the lock cannot be acquired
79
79
lock_path = tmp_path / "a"
@@ -147,7 +147,7 @@ async def test_non_blocking(lock_type: type[BaseAsyncFileLock], tmp_path: Path)
147
147
148
148
@pytest .mark .parametrize ("lock_type" , [AsyncFileLock , AsyncSoftFileLock ])
149
149
@pytest .mark .parametrize ("thread_local" , [True , False ])
150
- @pytest .mark .asyncio ()
150
+ @pytest .mark .asyncio
151
151
async def test_non_executor (lock_type : type [BaseAsyncFileLock ], thread_local : bool , tmp_path : Path ) -> None :
152
152
lock_path = tmp_path / "a"
153
153
lock = lock_type (str (lock_path ), thread_local = thread_local , run_in_executor = False )
@@ -157,7 +157,7 @@ async def test_non_executor(lock_type: type[BaseAsyncFileLock], thread_local: bo
157
157
assert not lock .is_locked
158
158
159
159
160
- @pytest .mark .asyncio ()
160
+ @pytest .mark .asyncio
161
161
async def test_coroutine_function (tmp_path : Path ) -> None :
162
162
acquired = released = False
163
163
0 commit comments