Commit 92b0ae8
committed
src/sage/env.py: canonicalize paths in a test
A test in sage.env is running sage in a subprocess to compare the
values of SAGE_ROOT and SAGE_LOCAL. It does the comparison as strings,
however, and can fail:
File "src/sage/env.py", line 14, in sage.env
Failed example:
out == repr((SAGE_ROOT, SAGE_LOCAL)) # long time
Expected:
True
Got:
False
This despite the fact that both values are equivalent:
sage: out
"('/home/mjo/src/sage.git/src/sage/../..', '/usr')"
sage: repr((SAGE_ROOT, SAGE_LOCAL))
"('/home/mjo/src/sage.git', '/usr')"
We update the test to canonicalize the paths within the subprocess,
and output only "True" or "False" instead.1 parent 7726cd9 commit 92b0ae8
1 file changed
+7
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
13 | 17 | | |
14 | | - | |
| 18 | + | |
15 | 19 | | |
16 | 20 | | |
17 | 21 | | |
| |||
0 commit comments