Opened 8 years ago
Closed 8 years ago
#10264 closed defect (fixed)
Doctest for r.chdir() should use realpath
Reported by: | jdemeyer | Owned by: | mvngu |
---|---|---|---|
Priority: | critical | Milestone: | sage-4.6.1 |
Component: | doctest coverage | Keywords: | |
Cc: | mpatel | 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 8 years ago by
- Status changed from new to needs_review
comment:2 Changed 8 years ago by
- Description modified (diff)
Changed 8 years ago by
comment:3 follow-up: ↓ 4 Changed 8 years ago by
Ticket #9970 is a duplicate, I think.
comment:4 in reply to: ↑ 3 Changed 8 years ago by
comment:5 Changed 8 years ago by
- Merged in set to sage-4.6.1.alpha2
comment:7 Changed 8 years ago by
- Reviewers set to Mitesh Patel
- Status changed from needs_review to 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 8 years ago by
- Resolution set to fixed
- Status changed from positive_review to 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