@@ -895,14 +895,12 @@ def test_bboxlog_2885():
895895 page = doc [0 ]
896896
897897 bbl = page .get_bboxlog ()
898- if pymupdf .mupdf_version_tuple >= (1 , 24 , 9 ):
899- wt = pymupdf .TOOLS .mupdf_warnings ()
900- assert wt == 'invalid marked content and clip nesting'
898+ wt = pymupdf .TOOLS .mupdf_warnings ()
899+ assert wt == 'invalid marked content and clip nesting'
901900
902901 bbl = page .get_bboxlog (layers = True )
903- if pymupdf .mupdf_version_tuple >= (1 , 24 , 9 ):
904- wt = pymupdf .TOOLS .mupdf_warnings ()
905- assert wt == 'invalid marked content and clip nesting'
902+ wt = pymupdf .TOOLS .mupdf_warnings ()
903+ assert wt == 'invalid marked content and clip nesting'
906904
907905def test_3081 ():
908906 '''
@@ -1588,10 +1586,7 @@ def test_scientific_numbers():
15881586 page .insert_text (point , "Test" )
15891587 contents = page .read_contents ()
15901588 print (f'{ contents = } ' )
1591- if pymupdf .mupdf_version_tuple >= (1 , 24 , 2 ):
1592- assert b" 1e-" not in contents
1593- else :
1594- assert b" 1e-" in contents
1589+ assert b" 1e-" not in contents
15951590
15961591def test_3615 ():
15971592 print ('' )
@@ -1611,16 +1606,8 @@ def test_3654():
16111606 for page in document :
16121607 content += page .get_text () + '\n \n '
16131608 content = content .strip ()
1614-
1615- if pymupdf .mupdf_version_tuple < (1 , 25 ):
1616- # As of 2024-07-04 we get a warning for this input file.
1617- wt = pymupdf .TOOLS .mupdf_warnings ()
1618- assert wt == 'dropping unclosed output'
16191609
16201610def test_3727 ():
1621- if pymupdf .mupdf_version_tuple < (1 , 24 , 9 ):
1622- print ('test_3727(): not running because known to segv: {pymupdf.mupdf_version=}' )
1623- return
16241611 path = os .path .normpath (f'{ __file__ } /../../tests/resources/test_3727.pdf' )
16251612 doc = pymupdf .open (path )
16261613 for page in doc :
@@ -1678,17 +1665,14 @@ def test_3450():
16781665 print (f'test_3450(): { t = } ' )
16791666
16801667def test_3859 ():
1681- if pymupdf .mupdf_version_tuple > (1 , 24 , 9 ):
1682- print (f'{ pymupdf .mupdf .PDF_NULL = } .' )
1683- print (f'{ pymupdf .mupdf .PDF_TRUE = } .' )
1684- print (f'{ pymupdf .mupdf .PDF_FALSE = } .' )
1685- for name in ('NULL' , 'TRUE' , 'FALSE' ):
1686- name2 = f'PDF_{ name } '
1687- v = getattr (pymupdf .mupdf , name2 )
1688- print (f'{ name = } { name2 = } { v = } { type (v )= } ' )
1689- assert type (v )== pymupdf .mupdf .PdfObj , f'`v` is not a pymupdf.mupdf.PdfObj.'
1690- else :
1691- assert not hasattr (pymupdf .mupdf , 'PDF_TRUE' )
1668+ print (f'{ pymupdf .mupdf .PDF_NULL = } .' )
1669+ print (f'{ pymupdf .mupdf .PDF_TRUE = } .' )
1670+ print (f'{ pymupdf .mupdf .PDF_FALSE = } .' )
1671+ for name in ('NULL' , 'TRUE' , 'FALSE' ):
1672+ name2 = f'PDF_{ name } '
1673+ v = getattr (pymupdf .mupdf , name2 )
1674+ print (f'{ name = } { name2 = } { v = } { type (v )= } ' )
1675+ assert type (v )== pymupdf .mupdf .PdfObj , f'`v` is not a pymupdf.mupdf.PdfObj.'
16921676
16931677def test_3905 ():
16941678 data = b'A,B,C,D\r \n 1,2,1,2\r \n 2,2,1,2\r \n '
@@ -1714,12 +1698,9 @@ def test_3624():
17141698 print (f'Saving to { path_png = } .' )
17151699 pixmap .save (path_png )
17161700 rms = gentle_compare .pixmaps_rms (path_png_expected , path_png )
1717- if pymupdf .mupdf_version_tuple < (1 , 24 , 10 ):
1718- assert rms > 12
1719- else :
1720- # We get small differences in sysinstall tests, where some
1721- # thirdparty libraries can differ.
1722- assert rms < 1
1701+ # We get small differences in sysinstall tests, where some thirdparty
1702+ # libraries can differ.
1703+ assert rms < 1
17231704
17241705
17251706def test_4043 ():
0 commit comments