@@ -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 '''
@@ -1591,10 +1589,7 @@ def test_scientific_numbers():
15911589 page .insert_text (point , "Test" )
15921590 contents = page .read_contents ()
15931591 print (f'{ contents = } ' )
1594- if pymupdf .mupdf_version_tuple >= (1 , 24 , 2 ):
1595- assert b" 1e-" not in contents
1596- else :
1597- assert b" 1e-" in contents
1592+ assert b" 1e-" not in contents
15981593
15991594def test_3615 ():
16001595 print ('' )
@@ -1614,16 +1609,8 @@ def test_3654():
16141609 for page in document :
16151610 content += page .get_text () + '\n \n '
16161611 content = content .strip ()
1617-
1618- if pymupdf .mupdf_version_tuple < (1 , 25 ):
1619- # As of 2024-07-04 we get a warning for this input file.
1620- wt = pymupdf .TOOLS .mupdf_warnings ()
1621- assert wt == 'dropping unclosed output'
16221612
16231613def test_3727 ():
1624- if pymupdf .mupdf_version_tuple < (1 , 24 , 9 ):
1625- print ('test_3727(): not running because known to segv: {pymupdf.mupdf_version=}' )
1626- return
16271614 path = os .path .normpath (f'{ __file__ } /../../tests/resources/test_3727.pdf' )
16281615 doc = pymupdf .open (path )
16291616 for page in doc :
@@ -1681,17 +1668,14 @@ def test_3450():
16811668 print (f'test_3450(): { t = } ' )
16821669
16831670def test_3859 ():
1684- if pymupdf .mupdf_version_tuple > (1 , 24 , 9 ):
1685- print (f'{ pymupdf .mupdf .PDF_NULL = } .' )
1686- print (f'{ pymupdf .mupdf .PDF_TRUE = } .' )
1687- print (f'{ pymupdf .mupdf .PDF_FALSE = } .' )
1688- for name in ('NULL' , 'TRUE' , 'FALSE' ):
1689- name2 = f'PDF_{ name } '
1690- v = getattr (pymupdf .mupdf , name2 )
1691- print (f'{ name = } { name2 = } { v = } { type (v )= } ' )
1692- assert type (v )== pymupdf .mupdf .PdfObj , f'`v` is not a pymupdf.mupdf.PdfObj.'
1693- else :
1694- assert not hasattr (pymupdf .mupdf , 'PDF_TRUE' )
1671+ print (f'{ pymupdf .mupdf .PDF_NULL = } .' )
1672+ print (f'{ pymupdf .mupdf .PDF_TRUE = } .' )
1673+ print (f'{ pymupdf .mupdf .PDF_FALSE = } .' )
1674+ for name in ('NULL' , 'TRUE' , 'FALSE' ):
1675+ name2 = f'PDF_{ name } '
1676+ v = getattr (pymupdf .mupdf , name2 )
1677+ print (f'{ name = } { name2 = } { v = } { type (v )= } ' )
1678+ assert type (v )== pymupdf .mupdf .PdfObj , f'`v` is not a pymupdf.mupdf.PdfObj.'
16951679
16961680def test_3905 ():
16971681 data = b'A,B,C,D\r \n 1,2,1,2\r \n 2,2,1,2\r \n '
@@ -1717,12 +1701,9 @@ def test_3624():
17171701 print (f'Saving to { path_png = } .' )
17181702 pixmap .save (path_png )
17191703 rms = gentle_compare .pixmaps_rms (path_png_expected , path_png )
1720- if pymupdf .mupdf_version_tuple < (1 , 24 , 10 ):
1721- assert rms > 12
1722- else :
1723- # We get small differences in sysinstall tests, where some
1724- # thirdparty libraries can differ.
1725- assert rms < 1
1704+ # We get small differences in sysinstall tests, where some thirdparty
1705+ # libraries can differ.
1706+ assert rms < 1
17261707
17271708
17281709def test_4043 ():
0 commit comments