File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -137,21 +137,29 @@ def test_open_exceptions():
137137 doc = pymupdf .open (filename , filetype = "xps" )
138138 except RuntimeError as e :
139139 assert repr (e ).startswith ("FileDataError" )
140+ else :
141+ assert 0
140142
141143 try :
142144 doc = pymupdf .open (filename , filetype = "xxx" )
143145 except Exception as e :
144146 assert repr (e ).startswith ("ValueError" )
147+ else :
148+ assert 0
145149
146150 try :
147151 doc = pymupdf .open ("x.y" )
148152 except Exception as e :
149153 assert repr (e ).startswith ("FileNotFoundError" )
154+ else :
155+ assert 0
150156
151157 try :
152158 doc = pymupdf .open ("pdf" , b"" )
153159 except RuntimeError as e :
154160 assert repr (e ).startswith ("EmptyFileError" )
161+ else :
162+ assert 0
155163
156164
157165def test_bug1945 ():
You can’t perform that action at this time.
0 commit comments