66
77from zarr .abc .store import ByteRequest , Store
88from zarr .core .buffer import Buffer
9+ from zarr .core .buffer .cpu import Buffer as CPUBuffer
910from zarr .core .buffer .cpu import buffer_prototype
1011from zarr .storage import LocalStore , WrapperStore
1112from zarr .testing .store import StoreTests
@@ -29,9 +30,9 @@ class OpenKwargs(TypedDict):
2930@pytest .mark .filterwarnings (
3031 "ignore:coroutine 'ClientCreatorContext.__aexit__' was never awaited:RuntimeWarning"
3132)
32- class TestWrapperStore (StoreTests [WrapperStore [LocalStore ], Buffer ]):
33- store_cls = WrapperStore [ LocalStore ]
34- buffer_cls = Buffer
33+ class TestWrapperStore (StoreTests [WrapperStore [Any ], Buffer ]):
34+ store_cls = WrapperStore
35+ buffer_cls = CPUBuffer
3536
3637 async def get (self , store : WrapperStore [LocalStore ], key : str ) -> Buffer :
3738 return self .buffer_cls .from_bytes ((store ._store .root / key ).read_bytes ())
@@ -99,7 +100,7 @@ async def set(self, key: str, value: Buffer) -> None:
99100 await super ().set (key , value )
100101
101102 key = "foo"
102- value = Buffer .from_bytes (b"bar" )
103+ value = CPUBuffer .from_bytes (b"bar" )
103104 store_wrapped = NoisySetter (store )
104105 await store_wrapped .set (key , value )
105106 captured = capsys .readouterr ()
@@ -119,7 +120,7 @@ async def get(
119120 await super ().get (key , prototype = prototype , byte_range = byte_range )
120121
121122 key = "foo"
122- value = Buffer .from_bytes (b"bar" )
123+ value = CPUBuffer .from_bytes (b"bar" )
123124 store_wrapped = NoisyGetter (store )
124125 await store_wrapped .set (key , value )
125126 await store_wrapped .get (key , buffer_prototype )
0 commit comments