4
4
5
5
import pytest
6
6
7
+ import zarr .core .buffer .cpu
7
8
from zarr .abc .store import Store
8
9
from zarr .core .buffer import Buffer
9
10
from zarr .core .buffer .cpu import buffer_prototype
25
26
)
26
27
class TestWrapperStore (StoreTests [WrapperStore [LocalStore ], Buffer ]):
27
28
store_cls = WrapperStore
28
- buffer_cls = Buffer
29
+ buffer_cls = zarr . core . buffer . cpu . Buffer
29
30
30
31
async def get (self , store : WrapperStore [LocalStore ], key : str ) -> Buffer :
31
32
return self .buffer_cls .from_bytes ((store ._store .root / key ).read_bytes ())
@@ -93,7 +94,7 @@ async def set(self, key: str, value: Buffer) -> None:
93
94
await super ().set (key , value )
94
95
95
96
key = "foo"
96
- value = Buffer .from_bytes (b"bar" )
97
+ value = zarr . core . buffer . cpu . Buffer .from_bytes (b"bar" )
97
98
store_wrapped = NoisySetter (store )
98
99
await store_wrapped .set (key , value )
99
100
captured = capsys .readouterr ()
@@ -113,7 +114,7 @@ async def get(
113
114
return await super ().get (key , prototype = prototype )
114
115
115
116
key = "foo"
116
- value = Buffer .from_bytes (b"bar" )
117
+ value = zarr . core . buffer . cpu . Buffer .from_bytes (b"bar" )
117
118
store_wrapped = NoisyGetter (store )
118
119
await store_wrapped .set (key , value )
119
120
assert await store_wrapped .get (key , buffer_prototype ) == value
0 commit comments