Skip to content

Commit a569a3f

Browse files
tests/: disable two long-running tests if running under valgrind.
1 parent 0e86f0b commit a569a3f

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

tests/test_general.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1529,6 +1529,9 @@ def test_3450():
15291529
#
15301530
# On a mac-mini, PyMuPDF-1.24.8 takes 60s, PyMuPDF-1.24.9 takes 4s.
15311531
#
1532+
if os.environ.get('PYMUPDF_RUNNING_ON_VALGRIND') == '1':
1533+
print(f'test_3450(): not running on valgrind because very slow.', flush=1)
1534+
return
15321535
path = os.path.normpath(f'{__file__}/../../tests/resources/test_3450.pdf')
15331536
pdf = pymupdf.open(path)
15341537
page = pdf[0]

tests/test_pixmap.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,10 @@ def do(gi):
367367

368368

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

0 commit comments

Comments
 (0)