Skip to content

Commit f631de2

Browse files
author
Matthias Koeppe
committed
sage -t --if-installed: Ignore all files except .py and .pyx
1 parent 255e2d8 commit f631de2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/sage/doctest/control.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,10 @@ def skipfile(filename, tested_optional_tags=False, *,
281281
if log:
282282
log(f"Skipping '{filename}' because it does not have one of the recognized file name extensions")
283283
return True
284+
if if_installed and ext not in ('.py', '.pyx'):
285+
if log:
286+
log(f"Skipping '{filename}' because it is not the source file of a Python module")
287+
return True
284288
if "jupyter_execute" in filename:
285289
if log:
286290
log(f"Skipping '{filename}' because it is created by the jupyter-sphinx extension for internal use and should not be tested")

0 commit comments

Comments
 (0)