-
-
Notifications
You must be signed in to change notification settings - Fork 487
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
src/sage/env.py: canonicalize paths in a test #38826
Conversation
Oh, so that's why it was using f-string substitution for a command with no variables...
|
ad85362
to
92b0ae8
Compare
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.
92b0ae8
to
53a6d31
Compare
Documentation preview for this PR (built with commit 53a6d31; changes) is ready! 🎉 |
CI is an unrelated timeout:
I'm going to start shamelessly plugging, On every ticket where the CI "fails" due to slow tests. |
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
This breaks the test on distro builds where
|
A test in sage.env is running sage in a subprocess to compare the values of
SAGE_ROOT
andSAGE_LOCAL
. It does the comparison as strings, however, and can fail:This despite the fact that both values are equivalent:
We update the test to canonicalize the paths within the subprocess, and output only "True" or "False" instead.