@@ -194,17 +194,24 @@ def test_files_but_config_file_missing(self):
194194 self .assertIn ("Error: file not found: pippo.py" , result .output )
195195 self .assertEqual (1 , result .exit_code )
196196
197- def test_files_with_format_option (self ):
197+ def test_files_with_format_json (self ):
198198 with text_file (DEFAULT_CONFIG_FILE_YAML , self .ok_config_yaml ):
199199 result = self .xrlint ("-f" , "json" , * self .files )
200200 self .assertIn ('"results": [\n ' , result .output )
201201 self .assertEqual (0 , result .exit_code )
202202
203+ def test_files_with_format_html (self ):
204+ with text_file (DEFAULT_CONFIG_FILE_YAML , self .ok_config_yaml ):
205+ result = self .xrlint ("-f" , "html" , * self .files )
206+ self .assertIn ("<h3>Results</h3>" , result .output )
207+ self .assertEqual (0 , result .exit_code )
208+
203209 def test_file_does_not_match (self ):
204210 with text_file (DEFAULT_CONFIG_FILE_YAML , no_match_config_yaml ):
205211 result = self .xrlint ("test.zarr" )
206- # TODO: make this assertion work
207- # self.assertIn("No configuration matches this file.", result.output)
212+ self .assertIn (
213+ "No configuration given or matches 'test.zarr'." , result .output
214+ )
208215 self .assertEqual (1 , result .exit_code )
209216
210217 def test_print_config_option (self ):
0 commit comments