File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -739,7 +739,6 @@ def _main(args=None):
739739 else :
740740 sys .exit (f"error: media type unknown for { gtype } " )
741741 return '\n ' .join (results )
742- return help_text
743742
744743
745744if __name__ == '__main__' :
Original file line number Diff line number Diff line change @@ -478,6 +478,14 @@ def test_multiple_inputs(self):
478478 "type: image/png encoding: None"
479479 )
480480
481+ def test_multiple_inputs_error (self ):
482+ with self .assertRaises (SystemExit ) as err :
483+ mimetypes ._main (shlex .split ("foo.pdf foo.bar_ext" ))
484+
485+ self .assertNotEqual (err .exception .code , 0 )
486+ self .assertIn ("error: media type unknown for foo.bar_ext" , str (err .exception ))
487+
488+
481489 def test_invocation (self ):
482490 for command , expected in [
483491 ("-l -e image/jpg" , ".jpg" ),
You can’t perform that action at this time.
0 commit comments