@@ -785,6 +785,9 @@ def test_2736():
785785
786786
787787def test_subset_fonts ():
788+ if os .environ .get ('PYODIDE_ROOT' ):
789+ print ('test_subset_fonts(): not running on Pyodide - ValueError: No font code \' ubuntu\' found in pymupdf-fonts.' )
790+ return
788791 """Confirm subset_fonts is working."""
789792 if not hasattr (pymupdf , "mupdf" ):
790793 print ("Not testing 'test_subset_fonts' in classic." )
@@ -1026,6 +1029,10 @@ def next_fd():
10261029 os .remove (oldfile )
10271030
10281031def test_cli ():
1032+ if os .environ .get ('PYODIDE_ROOT' ):
1033+ print ('test_cli(): not running on Pyodide - cannot run child processes.' )
1034+ return
1035+
10291036 if not hasattr (pymupdf , 'mupdf' ):
10301037 print ('test_cli(): Not running on classic because of fitz_old.' )
10311038 return
@@ -1063,6 +1070,10 @@ def test_cli_out():
10631070 Check redirection of messages and log diagnostics with environment
10641071 variables PYMUPDF_LOG and PYMUPDF_MESSAGE.
10651072 '''
1073+ if os .environ .get ('PYODIDE_ROOT' ):
1074+ print ('test_cli_out(): not running on Pyodide - cannot run child processes.' )
1075+ return
1076+
10661077 if not hasattr (pymupdf , 'mupdf' ):
10671078 print ('test_cli(): Not running on classic because of fitz_old.' )
10681079 return
@@ -1150,6 +1161,10 @@ def test_use_python_logging():
11501161 '''
11511162 Checks pymupdf.use_python_logging().
11521163 '''
1164+ if os .environ .get ('PYODIDE_ROOT' ):
1165+ print ('test_cli(): not running on Pyodide - cannot run child processes.' )
1166+ return
1167+
11531168 log_prefix = None
11541169 if os .environ .get ('PYMUPDF_USE_EXTRA' ) == '0' :
11551170 log_prefix = f'.+Using non-default setting from PYMUPDF_USE_EXTRA: \' 0\' '
@@ -1433,6 +1448,10 @@ def test_open2():
14331448 Checks behaviour of fz_open_document() and fz_open_document_with_stream()
14341449 with different filenames/magic values.
14351450 '''
1451+ if os .environ .get ('PYODIDE_ROOT' ):
1452+ print ('test_open2(): not running on Pyodide - cannot run child processes.' )
1453+ return
1454+
14361455 if platform .system () == 'Windows' :
14371456 print (f'test_open2(): not running on Windows because `git ls-files` known fail on Github Windows runners.' )
14381457 return
@@ -1789,6 +1808,10 @@ def test_4309():
17891808 document .delete_page ()
17901809
17911810def test_4263 ():
1811+ if os .environ .get ('PYODIDE_ROOT' ):
1812+ print ('test_4263(): not running on Pyodide - cannot run child processes.' )
1813+ return
1814+
17921815 path = os .path .normpath (f'{ __file__ } /../../tests/resources/test_4263.pdf' )
17931816 path_out = f'{ path } .linerarized.pdf'
17941817 command = f'pymupdf clean -linear { path } { path_out } '
@@ -1915,6 +1938,10 @@ def show(items):
19151938
19161939
19171940def test_4533 ():
1941+ if os .environ .get ('PYODIDE_ROOT' ):
1942+ print ('test_4533(): not running on Pyodide - cannot run child processes.' )
1943+ return
1944+
19181945 print ()
19191946 path = util .download (
19201947 'https://github.com/user-attachments/files/20497146/NineData_user_manual_V3.0.5.pdf' ,
@@ -1966,6 +1993,10 @@ def test_gitinfo():
19661993
19671994
19681995def test_4392 ():
1996+ if os .environ .get ('PYODIDE_ROOT' ):
1997+ print ('test_4392(): not running on Pyodide - cannot run child processes.' )
1998+ return
1999+
19692000 print ()
19702001 path = os .path .normpath (f'{ __file__ } /../../tests/test_4392.py' )
19712002 with open (path , 'w' ) as f :
0 commit comments