On Mon, Jun 8, 2009 at 6:20 PM, davidp<dav...@reed.edu> wrote:
>
> On the file test.py, consisting of
>
> """
>    EXAMPLES::
>
>        sage: gcd(4,6);
>        sage: a = {1:'a',
>                   2:'b'}
> """
>
> running sage -t produces two error messages (see below).  Is it true
> that sage -t does not recognize semicolons and does not parse line
> breaks correctly?  (Cutting and pasting the code in the examples into
> sage produces no errors.)

It seems so, but if you specify the line break using a backslash then
it works ok:

"""
EXAMPLES::
    sage: gcd(4,6);
    2
    sage: a = {1:'a', \
         2:'b'}

"""

$ sage -t test.py
sage -t  "test.py"
         [1.7 s]

----------------------------------------------------------------------
All tests passed!
Total time for all tests: 1.7 seconds


This is a little inconsistent because Python is happy with that line
break without a backslash...


-- 
Carlo Hamalainen
http://carlo-hamalainen.net

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to