diff tests/test_memory.py @ 39:a6bc019ac0b2 upstream

ADD: PyMuPDF v1.26.5: the original sdist.
author Franz Glasner <fzglas.hg@dom66.de>
date Sat, 11 Oct 2025 11:19:58 +0200
parents 1d09e1dec1d9
children
line wrap: on
line diff
--- a/tests/test_memory.py	Mon Sep 15 11:43:07 2025 +0200
+++ b/tests/test_memory.py	Sat Oct 11 11:19:58 2025 +0200
@@ -17,6 +17,10 @@
     '''
     Check for memory leaks.
     '''
+    if os.environ.get('PYODIDE_ROOT'):
+        print('test_2791(): not running on Pyodide - No module named \'psutil\'.')
+        return
+        
     if os.environ.get('PYMUPDF_RUNNING_ON_VALGRIND') == '1':
         print(f'test_2791(): not running because PYMUPDF_RUNNING_ON_VALGRIND=1.')
         return
@@ -94,6 +98,10 @@
 
 
 def test_4090():
+    if os.environ.get('PYODIDE_ROOT'):
+        print('test_4090(): not running on Pyodide - No module named \'psutil\'.')
+        return
+        
     print(f'test_4090(): {os.environ.get("PYTHONMALLOC")=}.')
     import psutil
     process = psutil.Process()
@@ -148,6 +156,10 @@
 
 
 def test_4125():
+    if os.environ.get('PYODIDE_ROOT'):
+        print('test_4125(): not running on Pyodide - No module named \'psutil\'.')
+        return
+        
     if os.environ.get('PYMUPDF_RUNNING_ON_VALGRIND') == '1':
         print(f'test_4125(): not running because PYMUPDF_RUNNING_ON_VALGRIND=1.')
         return