File tree Expand file tree Collapse file tree 3 files changed +42
-0
lines changed Expand file tree Collapse file tree 3 files changed +42
-0
lines changed Original file line number Diff line number Diff line change @@ -262,6 +262,13 @@ run-coverage = "pytest --cov-config=pyproject.toml --cov=pkg --cov-report xml --
262262run-coverage-gpu  = " pip install cupy-cuda12x && pytest -m gpu --cov-config=pyproject.toml --cov=pkg --cov-report xml --cov=src --junitxml=junit.xml -o junit_family=legacy" 
263263run-coverage-html  = " pytest --cov-config=pyproject.toml --cov=pkg --cov-report html --cov=src" 
264264
265+ [tool .hatch .envs .time_travel ]
266+ description  = " Test environment for tests against older zarr-python versions" 
267+ dependencies  = [
268+     " hatch ==1.14.1" 
269+     ]
270+ features =[" test"  ]
271+ 
265272[tool .ruff ]
266273line-length  = 100 
267274force-exclude  = true 
Original file line number Diff line number Diff line change 1+ from  pathlib  import  Path 
2+ 
3+ import  numpy  as  np 
4+ import  pytest 
5+ from  numcodecs  import  GZip 
6+ 
7+ from  zarr .core .group  import  GroupMetadata , create_hierarchy 
8+ from  zarr .core .metadata .v2  import  ArrayV2Metadata 
9+ from  zarr .storage  import  LocalStore 
10+ 
11+ 
12+ @pytest .fixture  
13+ def  hierarchy_model (request : pytest .FixtureRequest ) ->  dict [str , ArrayV2Metadata  |  GroupMetadata ]:
14+     dtype  =  np .uint8 ()
15+     return  {
16+         "" : GroupMetadata (attributes = {"foo" : "bar" }, zarr_format = 2 ),
17+         "/array" : ArrayV2Metadata (
18+             shape = (10 , 10 ),
19+             dtype = dtype ,
20+             chunks = (10 , 10 ),
21+             compressor = GZip (),
22+             fill_value = 1 ,
23+             order = "C" ,
24+             filters = [GZip ()],
25+         ),
26+     }
27+ 
28+ 
29+ async  def  test_copy (
30+     tmp_path : Path , hierarchy_model : dict [str , ArrayV2Metadata  |  GroupMetadata ]
31+ ) ->  None :
32+     # create the hierarchy 
33+     store  =  LocalStore (tmp_path )
34+     [x  async  for  x  in  create_hierarchy (store = store , nodes = hierarchy_model )]
35+     breakpoint ()
File renamed without changes.
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments