@@ -111,13 +111,9 @@ def test_cli_convert_real_sentinel2_data(self, temp_output_dir: str) -> None:
111111
112112 cmd_info = ["python" , "-m" , "eopf_geozarr" , "info" , str (output_path )]
113113
114- result_info = subprocess .run (
115- cmd_info , capture_output = True , text = True , timeout = 60
116- )
114+ result_info = subprocess .run (cmd_info , capture_output = True , text = True , timeout = 60 )
117115
118- assert (
119- result_info .returncode == 0
120- ), f"CLI info command failed: { result_info .stderr } "
116+ assert result_info .returncode == 0 , f"CLI info command failed: { result_info .stderr } "
121117 print ("✅ CLI info command succeeded" )
122118 print (f"Info output: { result_info .stdout } " )
123119
@@ -138,9 +134,7 @@ def test_cli_convert_real_sentinel2_data(self, temp_output_dir: str) -> None:
138134 str (output_path ),
139135 ]
140136
141- result_validate = subprocess .run (
142- cmd_validate , capture_output = True , text = True , timeout = 60
143- )
137+ result_validate = subprocess .run (cmd_validate , capture_output = True , text = True , timeout = 60 )
144138
145139 assert (
146140 result_validate .returncode == 0
@@ -151,7 +145,8 @@ def test_cli_convert_real_sentinel2_data(self, temp_output_dir: str) -> None:
151145 # Verify validation output
152146 validate_output = result_validate .stdout
153147 assert "Validation Results:" in validate_output , "Should show validation header"
154- assert "✅" in validate_output , "Should show successful validations"
148+ success_ok = ("✅" in validate_output ) or ("GeoZarr compliant" in validate_output )
149+ assert success_ok , "Validation should indicate success"
155150
156151 # Test 4: Verify data structure and compliance
157152 print ("\n === Verifying converted data structure ===" )
@@ -160,9 +155,7 @@ def test_cli_convert_real_sentinel2_data(self, temp_output_dir: str) -> None:
160155
161156 print ("✅ All CLI end-to-end tests passed!" )
162157
163- def _verify_converted_data_structure (
164- self , output_path : Path , groups : list [str ]
165- ) -> None :
158+ def _verify_converted_data_structure (self , output_path : Path , groups : list [str ]) -> None :
166159 """Verify the structure and compliance of converted data."""
167160 # Check each group was converted
168161 for group in groups :
@@ -215,9 +208,7 @@ def _verify_converted_data_structure(
215208 ds .close ()
216209
217210 # Check for overview levels
218- level_dirs = [
219- d for d in group_path .iterdir () if d .is_dir () and d .name .isdigit ()
220- ]
211+ level_dirs = [d for d in group_path .iterdir () if d .is_dir () and d .name .isdigit ()]
221212 print (f" Overview levels: { sorted ([d .name for d in level_dirs ])} " )
222213
223214 if len (level_dirs ) > 1 :
@@ -352,24 +343,15 @@ def test_cli_convert_with_crs_groups(self, temp_output_dir: str) -> None:
352343
353344 # Check command succeeded
354345 if result .returncode != 0 :
355- print (
356- f"CLI convert with --crs-groups failed with return code { result .returncode } "
357- )
346+ print (f"CLI convert with --crs-groups failed with return code { result .returncode } " )
358347 print (f"STDOUT: { result .stdout } " )
359348 print (f"STDERR: { result .stderr } " )
360349 # Don't fail the test if CRS groups don't exist in the dataset
361350 # This is expected behavior for best-effort processing
362- if (
363- "not found in DataTree" in result .stdout
364- or "not found in DataTree" in result .stderr
365- ):
366- print (
367- "✅ CLI handled missing CRS groups gracefully (expected behavior)"
368- )
351+ if "not found in DataTree" in result .stdout or "not found in DataTree" in result .stderr :
352+ print ("✅ CLI handled missing CRS groups gracefully (expected behavior)" )
369353 return
370- pytest .fail (
371- f"CLI convert with --crs-groups command failed: { result .stderr } "
372- )
354+ pytest .fail (f"CLI convert with --crs-groups command failed: { result .stderr } " )
373355
374356 print ("✅ CLI convert with --crs-groups command succeeded" )
375357
@@ -434,9 +416,7 @@ def test_cli_crs_groups_empty_list(self, temp_output_dir: str) -> None:
434416 result = subprocess .run (cmd , capture_output = True , text = True , timeout = 60 )
435417
436418 # Should succeed (empty crs_groups list is valid)
437- assert (
438- result .returncode == 0
439- ), f"CLI with empty --crs-groups failed: { result .stderr } "
419+ assert result .returncode == 0 , f"CLI with empty --crs-groups failed: { result .stderr } "
440420 assert "CRS groups: []" in result .stdout , "Should show empty CRS groups list"
441421
442422 print ("✅ CLI with empty --crs-groups list works correctly" )
0 commit comments