On Jul 25, 2009, at 9:38 AM, William Stein wrote:

>
> On Fri, Jul 24, 2009 at 2:19 PM, Robert
> Bradshaw<rober...@math.washington.edu> wrote:
>>
>> On Jul 24, 2009, at 11:22 AM, Simon King wrote:
>>
>>>
>>> I think  it would be nice to have the possibility to do the  
>>> following
>>> in doc tests:
>>>
>>> """
>>> EXAMPLES::
>>>
>>>     sage: R.<x,y,z> = QQ[]
>>>     #<if testflag contains "long">
>>>     sage: I = ... # some nasty ideal
>>>     sage: G = I.groebner_basis()
>>>     #<if (testflag contains "magma") or (testflag contains  
>>> "optional")
>>>>
>>>     sage: GM = I.groebner_basis(algorithm="magma")
>>>     sage: G == GM
>>>     True
>>>     #<end if>
>>>     #<else>
>>>      sage: I = ... # some less nasty ideal
>>>     sage: G = I.groebner_basis()
>>>     #<end if>
>>>     sage: p = ... # some ideal that both belongs to the nasty and  
>>> the
>>> less nasty ideal
>>>     sage: p.reduce(G)
>>>     0
>>>
>>> """
>>
>> Doctests are for human consumption, as well as automated testing, and
>> I find the above nested if statements hard to visually parse.
>>
>> If one wants, one can do
>>
>> sage: m = None
>> sage: m = massive_calculation() # long time
>> sage: if m:
>> ...: m.do_something()
>>
>> Also, I think -t -long should be a superset of plain old -t, as
>> should all extra testing options.
>>
>
> This isn't quite the case.  E.g., note that if you do
>
>    sage -t -optional_only=magma <list of files>
>
> then only blocks of code that have any # magma 's are tested.

I'm fine with that--it's totally explicit. I was more thinking along  
the lines that if I run "sage -t long" I shouldn't have to run "sage - 
t" as well.

- Robert



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