99
1010
1111@pytest .mark .parametrize ("N" , (1 , 2 , 4 , 16 , 64 ))
12- async def test_gready_cache_decorator (N : int , pgconn : asyncpg .Connection ) -> None :
12+ async def test_greedy_cache_decorator (N : int , pgconn : asyncpg .Connection ) -> None :
1313 statistics = collections .Counter [str ]()
1414 listener = listeners .PGEventQueue ()
1515 await listener .connect (pgconn , models .PGChannel ("test_cache_decorator" ))
1616
1717 @decorators .cache (
18- strategy = strategies .Gready (listener = listener ),
18+ strategy = strategies .Greedy (listener = listener ),
1919 statistics_callback = lambda x : statistics .update ([x ]),
2020 )
2121 async def now () -> datetime .datetime :
@@ -29,18 +29,18 @@ async def now() -> datetime.datetime:
2929
3030
3131@pytest .mark .parametrize ("N" , (1 , 2 , 4 , 16 , 64 ))
32- async def test_gready_cache_decorator_connection_closed (
32+ async def test_greedy_cache_decorator_connection_closed (
3333 N : int ,
3434 pgconn : asyncpg .Connection ,
3535) -> None :
3636 listener = listeners .PGEventQueue ()
3737 await listener .connect (
3838 pgconn ,
39- models .PGChannel ("test_gready_cache_decorator_connection_closed " ),
39+ models .PGChannel ("test_greedy_cache_decorator_connection_closed " ),
4040 )
4141 await pgconn .close ()
4242
43- @decorators .cache (strategy = strategies .Gready (listener = listener ))
43+ @decorators .cache (strategy = strategies .Greedy (listener = listener ))
4444 async def now () -> datetime .datetime :
4545 return datetime .datetime .now ()
4646
@@ -49,17 +49,17 @@ async def now() -> datetime.datetime:
4949
5050
5151@pytest .mark .parametrize ("N" , (1 , 2 , 4 , 16 , 64 ))
52- async def test_gready_cache_decorator_exceptions (
52+ async def test_greedy_cache_decorator_exceptions (
5353 N : int ,
5454 pgconn : asyncpg .Connection ,
5555) -> None :
5656 listener = listeners .PGEventQueue ()
5757 await listener .connect (
5858 pgconn ,
59- models .PGChannel ("test_gready_cache_decorator_exceptions " ),
59+ models .PGChannel ("test_greedy_cache_decorator_exceptions " ),
6060 )
6161
62- @decorators .cache (strategy = strategies .Gready (listener = listener ))
62+ @decorators .cache (strategy = strategies .Greedy (listener = listener ))
6363 async def raise_runtime_error () -> NoReturn :
6464 raise RuntimeError
6565
@@ -76,19 +76,19 @@ async def raise_runtime_error() -> NoReturn:
7676
7777
7878@pytest .mark .parametrize ("N" , (1 , 2 , 4 , 16 , 64 ))
79- async def test_gready_cache_identity (
79+ async def test_greedy_cache_identity (
8080 N : int ,
8181 pgconn : asyncpg .Connection ,
8282) -> None :
8383 statistics = collections .Counter [str ]()
8484 listener = listeners .PGEventQueue ()
8585 await listener .connect (
8686 pgconn ,
87- models .PGChannel ("test_gready_cache_decorator_exceptions " ),
87+ models .PGChannel ("test_greedy_cache_decorator_exceptions " ),
8888 )
8989
9090 @decorators .cache (
91- strategy = strategies .Gready (listener = listener ),
91+ strategy = strategies .Greedy (listener = listener ),
9292 statistics_callback = lambda x : statistics .update ([x ]),
9393 )
9494 async def identity (x : int ) -> int :
@@ -102,19 +102,19 @@ async def identity(x: int) -> int:
102102
103103
104104@pytest .mark .parametrize ("N" , (1 , 2 , 4 , 16 , 64 ))
105- async def test_gready_cache_sleepy (
105+ async def test_greedy_cache_sleepy (
106106 N : int ,
107107 pgconn : asyncpg .Connection ,
108108) -> None :
109109 statistics = collections .Counter [str ]()
110110 listener = listeners .PGEventQueue ()
111111 await listener .connect (
112112 pgconn ,
113- models .PGChannel ("test_gready_cache_decorator_exceptions " ),
113+ models .PGChannel ("test_greedy_cache_decorator_exceptions " ),
114114 )
115115
116116 @decorators .cache (
117- strategy = strategies .Gready (listener = listener ),
117+ strategy = strategies .Greedy (listener = listener ),
118118 statistics_callback = lambda x : statistics .update ([x ]),
119119 )
120120 async def now () -> datetime .datetime :
0 commit comments