Thanks David and Erik for your replies. I could not disable the doct-tests  
so I have changed my output to:

sage: print(CartanType(['A', oo]).ascii_art()) 
..---O---O---O---O---O---O---O---.. 
    -3  -2  -1   0   1   2   3


which I think is good enough.

Andrew

On Friday, 8 July 2016 10:34:31 UTC+2, Erik Bray wrote:
>
> On Thu, Jul 7, 2016 at 1:13 PM, Andrew <andrew...@gmail.com <javascript:>> 
> wrote: 
> > Hi! 
> > 
> > How do you doc-test output that starts with ...? The particular output 
> that 
> > I want to test is: 
> > 
> > sage: print(CartanType(['A', oo]).ascii_art()) 
> > ...---O---O---O---O---O---O---O---... 
> >      -3  -2  -1   0   1   2   3 
> > 
> > but sage complains with: 
> > 
> > 
> > ValueError: line 6 of the docstring for 
> > sage.combinat.root_system.type_A_infinity.CartanType.i lacks blank after 
> > ...: '    ...---O---O---O---O---O---O---O---...' 
> > 
> > Clearly, sphinx is getting confused because ... normally indicates code 
> > continuation. Is it possible to work around or disable this or do I need 
> to 
> > change my output? 
>
> In the normal doctest framework you can enable and disable such 
> options using the directives documented here: 
> https://docs.python.org/2.7/library/doctest.html#directives  (and it's 
> possible to extend it with additional directives). 
>
> So you should be able to disable ellipsis completion by adding 
>
>     # doctest: -ELLIPSIS 
>
> next to your test.  I don't know if for some reason that doesn't work 
> for sage's doctests though.  I see no reason it shouldn't though... 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to