Skip to content

Commit 9007035

Browse files
author
rodrigo.nogueira
committed
style: fix test formatting with pre-commit
1 parent 9a7850f commit 9007035

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

tests/test_thread_safety.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
from async_lru import AlruCacheLoopResetWarning, alru_cache
77

8+
89
@pytest.mark.filterwarnings("ignore::async_lru.AlruCacheLoopResetWarning")
910
def test_cross_loop_auto_resets_cache() -> None:
1011
@alru_cache(maxsize=100)
@@ -49,6 +50,7 @@ async def cached_func(key: str) -> str:
4950
assert cached_func.cache_info().hits == 0
5051
assert cached_func.cache_info().misses == 1
5152

53+
5254
@pytest.mark.filterwarnings("ignore::async_lru.AlruCacheLoopResetWarning")
5355
def test_invalid_key_does_not_bind_loop() -> None:
5456
@alru_cache(maxsize=100)
@@ -142,6 +144,7 @@ async def run_concurrent() -> list[str]:
142144
assert results == ["data_test"] * 3
143145
assert cached_func.cache_info().hits == 2
144146

147+
145148
@pytest.mark.filterwarnings("ignore::async_lru.AlruCacheLoopResetWarning")
146149
def test_multiple_loop_transitions() -> None:
147150
@alru_cache(maxsize=100)
@@ -190,8 +193,6 @@ async def cached_func(key: str) -> str:
190193
all_warnings.extend(w)
191194

192195
reset_warnings = [
193-
w for w in all_warnings
194-
if issubclass(w.category, AlruCacheLoopResetWarning)
196+
w for w in all_warnings if issubclass(w.category, AlruCacheLoopResetWarning)
195197
]
196198
assert len(reset_warnings) == 1
197-

0 commit comments

Comments
 (0)