On Tue, Apr 15, 2008 at 9:11 AM, Jason Bandlow <[EMAIL PROTECTED]> wrote:
>
>  Hello all,
>
>  Regarding doctesting, I'd like to work with the following setup:
>  1. Create a file work.sage (or work.py) somewhere in my home directory.
>  2. Start a notebook session, and attach work.sage.
>  3. Use the notebook for generating and staring at data, while using a
>  text editor to modify my code.
>  4. Periodically run: $ sage -t work.sage      to make sure that I
>  haven't completely fouled things up.
>
>  Step 4 seems not to work (on Sage 2.11 on Ubuntu).  For example,
>  I created the following file, foo.py, in my ~/.sage directory:
>
>  def foo(x):
>     r"""
>     Shows how doctests don't work.
>
>     EXAMPLES:
>         sage: 2+2
>         5
>         sage: foo(3)
>         4
>     """
>     print(x)
>
>  And then
>  $ sage -t --verbose ~/.sage/foo.py
>
>  ----------------------------------------------------------------------
>  All tests passed!
>  Total time for all tests: 0.0 seconds
>
>  $ sage -coverage ~/.sage/foo.py
>  ----------------------------------------------------------------------
>  foo.py
>  SCORE foo.py: 100% (1 of 1)
>  ----------------------------------------------------------------------
>
>
>  Can someone explain to me what's going on here?

Somebody (I don't want to name names; maybe it is me?) has completely
broken doctesting of user files, evidently.   There has
been a lot of changes made to the doctesting system
recently, and I don't know which thing caused the
above very serious problems.    Even doctesting a pure
.py file is broken!

teragon:.sage was$ more foo.py
def foo(x):
   r"""
   Shows how doctests don't work.

   EXAMPLES:
       sage: 2+2
       5
       sage: foo(3)
       4
   """
   print(x)

teragon:.sage was$ sage -t foo.py

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


 -- William

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

Reply via email to