You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gh-38826: 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.
URL: #38826
Reported by: Michael Orlitzky
Reviewer(s): Tobias Diez
0 commit comments