Running tests for specific method in SAGE

Viewed 16

I know there is possible to run tests for specific lines and methods in some languages/frameworks as for example Ruby on Rails. I would like to know if there is some specific syntax to do the same in SAGE math. For example, suppose I have the next code. I would like to run only the EXAMPLES of method1 with something like sage -t module.py:method1

#module.py

def method1():
    """
    EXAMPLES::
     
    sage: 5+0
    5
    """
    return 1

def method2():
    """
    EXAMPLES::
     
    sage: 5+2
    7
    """
    return 2
0 Answers
Related