Skip to content
This repository was archived by the owner on Feb 1, 2023. It is now read-only.

Commit 437bbd8

Browse files
author
Release Manager
committed
Trac #28671: fix doctests when DOT_SAGE is symbolic link
If `DOT_SAGE` points to a symbolic link, the following 2 doctests fail, as symbolic links are not resolved in these tests: {{{ sage -t --long --warn-long 54.2 src/sage/misc/inline_fortran.py ********************************************************************** File "src/sage/misc/inline_fortran.py", line 149, in sage.misc.inline_fo rtran._import_module_from_path._import_module_from_path_impl Failed example: os.getcwd() == os.path.normpath(DOT_SAGE) Expected: True Got: False ********************************************************************** sage -t --long --warn-long 54.2 src/sage/misc/sage_ostools.pyx ********************************************************************** File "src/sage/misc/sage_ostools.pyx", line 67, in sage.misc.sage_ostools.restore_cwd Failed example: with restore_cwd(str(SAGE_TMP)): print(os.getcwd() == SAGE_TMP) Expected: True Got: False }}} URL: https://trac.sagemath.org/28671 Reported by: gh-mwageringel Ticket author(s): Markus Wageringel Reviewer(s): Michael Orlitzky
2 parents 6f95bfa + 4ac4fa3 commit 437bbd8

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

build/pkgs/configure/checksums.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
tarball=configure-VERSION.tar.gz
2-
sha1=16999eea7613ed2ed183a5b2c3eefc6265685017
3-
md5=ece66d1eaec2065f7a0e0aad65d71b90
4-
cksum=906044305
2+
sha1=2c8db185905f5447481b270fd484ab248e0c9206
3+
md5=ce2cd746b7a24887bf0322e0d0fd711a
4+
cksum=4219256350
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
52ba9a76be0b56be044a441ee2448a4f4d93c6c3
1+
0c6c68bffee0111ee730071a39aad4a2a21d012a

src/sage/misc/inline_fortran.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def eval(self, x, globals=None, locals=None):
146146
Traceback (most recent call last):
147147
...
148148
RuntimeError: failed to compile Fortran code:...
149-
sage: os.getcwd() == os.path.normpath(DOT_SAGE)
149+
sage: os.getcwd() == os.path.realpath(DOT_SAGE)
150150
True
151151
"""
152152
if globals is None:

src/sage/misc/sage_ostools.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def restore_cwd(chdir=None):
6565
sage: from sage.misc.misc import SAGE_TMP
6666
sage: cwd = os.getcwd()
6767
sage: with restore_cwd(str(SAGE_TMP)):
68-
....: print(os.getcwd() == SAGE_TMP)
68+
....: print(os.getcwd() == os.path.realpath(SAGE_TMP))
6969
True
7070
sage: cwd == os.getcwd()
7171
True

0 commit comments

Comments
 (0)