File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -9,8 +9,9 @@ def test_2548():
9
9
10
10
Old MuPDF version did not detect the loop.
11
11
"""
12
+ print (f'test_2548(): { fitz .mupdf_version_tuple = } ' )
12
13
if fitz .mupdf_version_tuple < (1 , 23 , 4 ):
13
- print (f'Not testing #2548 because infinite hang before mupdf-1.23.4.' )
14
+ print (f'test_2548(): Not testing #2548 because infinite hang before mupdf-1.23.4.' )
14
15
return
15
16
fitz .TOOLS .mupdf_warnings (reset = True )
16
17
doc = fitz .open (f'{ root } /tests/resources/test_2548.pdf' )
@@ -28,9 +29,13 @@ def test_2548():
28
29
expected = "RuntimeError('cycle in structure tree')"
29
30
assert repr (ee ) == expected , f'Expected { expected = } but got { repr (ee )= } .'
30
31
e = True
31
- # After 2023-11-05 mupdf master no longer raises an exception, but does
32
- # write a warning.
33
32
wt = fitz .TOOLS .mupdf_warnings ()
34
- print (f'{ wt = } ' )
35
- assert wt == 'structure tree broken, assume tree is missing: cycle in structure tree'
36
- assert not e
33
+ print (f'test_2548(): { wt = } ' )
34
+ if fitz .mupdf_version_tuple == (1 , 23 , 5 ):
35
+ assert e
36
+ assert not wt
37
+ else :
38
+ # After 2023-11-05 mupdf master no longer raises an exception, but does
39
+ # write a warning.
40
+ assert wt == 'structure tree broken, assume tree is missing: cycle in structure tree'
41
+ assert not e
You can’t perform that action at this time.
0 commit comments