File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 44import os
55from typing import TYPE_CHECKING
66
7+ import numpy as np
78import pytest
89from packaging .version import parse as parse_version
910
@@ -110,12 +111,12 @@ def test_open_s3map() -> None:
110111 mapper = s3_filesystem .get_mapper (f"s3://{ test_bucket_name } /map/foo/" )
111112 arr = zarr .open (store = mapper , mode = "w" , shape = (3 , 3 ))
112113 assert isinstance (arr , Array )
113-
114- arr [... ] = 3
115- z2 = zarr . open ( store = mapper , mode = "w" , shape = ( 3 , 3 ))
116- assert isinstance ( z2 , Array )
117- assert not ( z2 [:] == 3 ). all ( )
118- z2 [:] = 3
114+ # Set values
115+ arr [: ] = 1
116+ # Read set values
117+ arr = zarr . open ( store = mapper , mode = "r" , shape = ( 3 , 3 ) )
118+ assert isinstance ( arr , Array )
119+ np . testing . assert_array_equal ( np . ones (( 3 , 3 )), arr [:])
119120
120121
121122def test_open_s3map_raises () -> None :
You can’t perform that action at this time.
0 commit comments