Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
src/bin/sage-runtests: Do not run pytest if the pytest configuration …
Browse files Browse the repository at this point in the history
…is not available
  • Loading branch information
mkoeppe committed Mar 25, 2022
1 parent 55a711e commit d0831c1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/bin/sage-runtests
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,14 @@ if __name__ == "__main__":
DC = DocTestController(args, args.filenames)
err = DC.run()

# Trac #33521: Do not run pytest if the pytest configuration is not available.
# This happens when the source tree is not available and SAGE_SRC falls back
# to SAGE_LIB.
from sage.env import SAGE_SRC
if not all(os.path.isfile(os.path.join(SAGE_SRC, f))
for f in ["conftest.py", "tox.ini"]):
sys.exit(err)

try:
exit_code_pytest = 0
import pytest
Expand Down

0 comments on commit d0831c1

Please sign in to comment.