Skip to content

Commit

Permalink
tests/: disable two long-running tests if running under valgrind.
Browse files Browse the repository at this point in the history
  • Loading branch information
julian-smith-artifex-com committed Nov 19, 2024
1 parent 0e86f0b commit a569a3f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/test_general.py
Original file line number Diff line number Diff line change
Expand Up @@ -1529,6 +1529,9 @@ def test_3450():
#
# On a mac-mini, PyMuPDF-1.24.8 takes 60s, PyMuPDF-1.24.9 takes 4s.
#
if os.environ.get('PYMUPDF_RUNNING_ON_VALGRIND') == '1':
print(f'test_3450(): not running on valgrind because very slow.', flush=1)
return
path = os.path.normpath(f'{__file__}/../../tests/resources/test_3450.pdf')
pdf = pymupdf.open(path)
page = pdf[0]
Expand Down
4 changes: 4 additions & 0 deletions tests/test_pixmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,10 @@ def do(gi):


def test_3848():
if os.environ.get('PYMUPDF_RUNNING_ON_VALGRIND') == '1':
# Takes 40m on Github.
print(f'test_3848(): not running on valgrind because very slow.', flush=1)
return
path = os.path.normpath(f'{__file__}/../../tests/resources/test_3848.pdf')
with pymupdf.open(path) as document:
for i in range(len(document)):
Expand Down

0 comments on commit a569a3f

Please sign in to comment.