Skip to content

Commit b806949

Browse files
committed
Remove failing test in sage.env that test importing sage.all
1 parent 59c87cd commit b806949

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

src/sage/env.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +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: env = {k:v for (k,v) in os.environ.items() if not k.startswith("SAGE_")}
12-
sage: from subprocess import check_output
13-
sage: module_name = "sage.all" # hide .all import from the linter
14-
sage: cmd = f"from {module_name} import SAGE_ROOT, SAGE_LOCAL;"
15-
sage: cmd += "from os.path import samefile;"
16-
sage: if SAGE_ROOT is None:
17-
....: cmd += "s1 = SAGE_ROOT is None;"
18-
....: else:
19-
....: cmd += f"s1 = samefile(SAGE_ROOT, '{SAGE_ROOT}');"
20-
sage: cmd += f"s2 = samefile(SAGE_LOCAL, '{SAGE_LOCAL}');"
21-
sage: cmd += "print(s1 and s2);"
22-
sage: out = check_output([sys.executable, "-c", cmd], env=env).decode().strip() # long time
23-
sage: out == "True" # long time
24-
True
25-
265
AUTHORS:
276
287
- \R. Andrew Ohana (2012): initial version

0 commit comments

Comments
 (0)