Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sagemathgh-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: sagemath#38826 Reported by: Michael Orlitzky Reviewer(s): Tobias Diez
- Loading branch information