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

Commit

Permalink
Trac 33624: don't assume SAGE_VENV/bin contains sage
Browse files Browse the repository at this point in the history
Replace doctests in `have_program` that check in `SAGE_VENV/bin` by
similar ones in `/bin`, which should be more standard.

In any case `have_program` is scheduled for removal (see #32957).
  • Loading branch information
tornaria committed Apr 2, 2022
1 parent 43474c9 commit 0c1ca80
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/sage/misc/sage_ostools.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,11 @@ def have_program(program, path=None):
True
sage: have_program('there_is_not_a_program_with_this_name')
False
sage: from sage.env import SAGE_VENV
sage: have_program('sage', os.path.join(SAGE_VENV, 'bin'))
sage: have_program('sh', '/bin')
True
sage: have_program('sage', '/there_is_not_a_path_with_this_name')
False
sage: have_program('there_is_not_a_program_with_this_name', os.path.join(SAGE_VENV, 'bin'))
sage: have_program('there_is_not_a_program_with_this_name', "/bin")
False
"""
if path is None:
Expand Down

0 comments on commit 0c1ca80

Please sign in to comment.