Opened 12 years ago
Closed 12 years ago
#10264 closed defect (fixed)
Doctest for r.chdir() should use realpath
Reported by: | Jeroen Demeyer | Owned by: | Minh Van Nguyen |
---|---|---|---|
Priority: | critical | Milestone: | sage-4.6.1 |
Component: | doctest coverage | Keywords: | |
Cc: | Mitesh Patel | Merged in: | sage-4.6.1.alpha2 |
Authors: | Jeroen Demeyer | Reviewers: | Mitesh Patel |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
The following test from sage/interfaces/r.py
breaks when $TMPDIR
(by default /tmp
) is a symbolic link:
EXAMPLES:: sage: import tempfile sage: tmpdir = tempfile.mkdtemp() sage: r.chdir(tmpdir) On Linux, we could use ``tmpdir == sageobj(r.getwd())`` to test this, but Mac prepends ``/private/`` to such directories, so we check that the directory name string is in the working directory string instead:: sage: tmpdir in sageobj(r.getwd()) True
Attachments (1)
Change History (9)
comment:1 Changed 12 years ago by
Status: | new → needs_review |
---|
comment:2 Changed 12 years ago by
Description: | modified (diff) |
---|
Changed 12 years ago by
Attachment: | 10264_tmpdir_realpath.patch added |
---|
comment:4 Changed 12 years ago by
comment:5 Changed 12 years ago by
Merged in: | → sage-4.6.1.alpha2 |
---|
comment:7 Changed 12 years ago by
Reviewers: | → Mitesh Patel |
---|---|
Status: | needs_review → positive_review |
The patch looks good. I tested it successfully on bsd.math (OS X 10.6), sage.math (Ubuntu 8.04.4 LTS), and fulvia.skynet (SunOS 5.10) with TMPDIR
unset, set to a path with no symbolic links, and set to a path with a link.
comment:8 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | positive_review → closed |
Note: See
TracTickets for help on using
tickets.
Tested on Linux with
Tested on OS X 10.4 (where
/tmp
is a symlink to/private/tmp
) with