Hello,

I'm wondering whether there is a way to run the doctests of a single
function. Something like this:

def f():
    r"""
    sage: f()
    42
    """
    return 41

run_doctests(f)


(Note: there is a command called run_doctests, which runs all tests in a
file / module, which I find very useful; thanks!)

I see at least two advantages of such a function:

1. It can help with development.

2. Users who like working in a notebook can write doctests to test their
code.

Thanks,

Franco

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