Skip to content

Commit

Permalink
tests/test_memory.py
Browse files Browse the repository at this point in the history
  • Loading branch information
julian-smith-artifex-com committed Dec 10, 2024
1 parent 3a55c3b commit 811f4d1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/test_memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ def test_4125():
print(f'test_4125(): not running on msys2 - psutil not available.')
return

print(f'test_4125():')
print('')
print(f'test_4125(): {platform.python_version()=}.')

path = os.path.normpath(f'{__file__}/../../tests/resources/test_4125.pdf')
import gc
Expand Down Expand Up @@ -203,8 +204,9 @@ def get_stat():
drss = state.rsss[i] - state.rsss[i-1]
pv = platform.python_version_tuple()
pv = (int(pv[0]), int(pv[1]))
if pv == (3, 9):
print(f'test_4090(): Not checking on Python-3.9.')
if pv < (3, 11):
# Python < 3.11 has less reliable memory usage so we exclude.
print(f'test_4125(): Not checking on {platform.python_version_tuple()=} because < 3.11.')
elif pymupdf.mupdf_version_tuple < (1, 25, 2):
drss_expected = 4915200
e = abs(1 - drss / drss_expected)
Expand Down

0 comments on commit 811f4d1

Please sign in to comment.