File tree Expand file tree Collapse file tree 2 files changed +0
-16
lines changed Expand file tree Collapse file tree 2 files changed +0
-16
lines changed Original file line number Diff line number Diff line change 4444
4545import asyncio
4646import typing
47- from collections .abc import Set
4847
4948from ._receiver import Receiver
5049
@@ -146,13 +145,6 @@ def unique_id(self) -> str:
146145 """The unique identifier of this instance."""
147146 return self ._unique_id
148147
149- def keys (self ) -> Set [HashableT ]:
150- """Return the set of keys for which values have been received.
151-
152- If no key function is provided, this will return an empty set.
153- """
154- return self ._latest_value_by_key .keys ()
155-
156148 def get (self , key : HashableT | Sentinel = NO_KEY ) -> T_co :
157149 """Return the latest value that has been received.
158150
Original file line number Diff line number Diff line change @@ -44,8 +44,6 @@ async def test_latest_value_cache() -> None:
4444
4545 assert cache .get () == 19
4646
47- assert cache .keys () == set ()
48-
4947
5048@pytest .mark .integration
5149async def test_latest_value_cache_key () -> None :
@@ -61,8 +59,6 @@ async def test_latest_value_cache_key() -> None:
6159 with pytest .raises (ValueError , match = "No value received for key: 0" ):
6260 cache .get (0 )
6361
64- assert cache .keys () == set ()
65-
6662 await sender .send ((5 , "a" ))
6763 await sender .send ((6 , "b" ))
6864 await sender .send ((5 , "c" ))
@@ -77,8 +73,6 @@ async def test_latest_value_cache_key() -> None:
7773 assert cache .get (5 ) == (5 , "c" )
7874 assert cache .get (6 ) == (6 , "b" )
7975
80- assert cache .keys () == {5 , 6 }
81-
8276 with pytest .raises (ValueError , match = "No value received for key: 7" ):
8377 cache .get (7 )
8478
@@ -98,5 +92,3 @@ async def test_latest_value_cache_key() -> None:
9892 await asyncio .sleep (0 )
9993
10094 assert cache .get (6 ) == (6 , "g" )
101-
102- assert cache .keys () == {5 , 6 , 12 }
You can’t perform that action at this time.
0 commit comments