Skip to content

Commit efac68c

Browse files
committed
Remove outdated verification test for SAGE_ROOT and SAGE_LOCAL in sage-the-distro env
1 parent 8fa9559 commit efac68c

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

src/sage/env.py

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,6 @@
22
r"""
33
Sage Runtime Environment
44
5-
Verify that importing ``sage.all`` works in Sage's Python without any
6-
``SAGE_`` environment variables, and has the same ``SAGE_ROOT`` and
7-
``SAGE_LOCAL`` (see also :issue:`29446`). If ``SAGE_ROOT`` is a path,
8-
we normalize it, but keep in mind that ``SAGE_ROOT`` may also be
9-
``None``::
10-
11-
sage: # long time
12-
sage: env = {k:v for (k,v) in os.environ.items() if not k.startswith("SAGE_")}
13-
sage: from subprocess import run, PIPE
14-
sage: module_name = "sage.all" # hide .all import from the linter
15-
sage: cmd = f"from {module_name} import SAGE_ROOT, SAGE_LOCAL;"
16-
sage: cmd += "from os.path import samefile;"
17-
sage: if SAGE_ROOT is None:
18-
....: cmd += "s1 = SAGE_ROOT is None;"
19-
....: else:
20-
....: cmd += f"s1 = samefile(SAGE_ROOT, '{SAGE_ROOT}');"
21-
sage: cmd += f"s2 = samefile(SAGE_LOCAL, '{SAGE_LOCAL}');"
22-
sage: cmd += "print(s1 and s2);"
23-
sage: out = run([sys.executable, "-c", cmd], env=env, stdout=PIPE, stderr=PIPE, check=False, text=True, encoding='u8', errors='replace')
24-
sage: out.returncode
25-
0
26-
sage: out.stdout.strip()
27-
'True'
28-
sage: out.stderr.strip()
29-
''
30-
315
AUTHORS:
326
337
- \R. Andrew Ohana (2012): initial version

0 commit comments

Comments
 (0)