#10264: Doctest for r.chdir() should use realpath
------------------------------+---------------------------------------------
   Reporter:  jdemeyer        |       Owner:  mvngu       
       Type:  defect          |      Status:  needs_review
   Priority:  critical        |   Milestone:  sage-4.6.1  
  Component:  doctest         |    Keywords:              
     Author:  Jeroen Demeyer  |    Upstream:  N/A         
   Reviewer:                  |      Merged:              
Work_issues:                  |  
------------------------------+---------------------------------------------
Description changed by jdemeyer:

Old description:

> This breaks when {{{/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
> }}}

New description:

 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
 }}}

--

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10264#comment:2>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to