Scrips to try functions with de py.test library.
Script.py
def function:
def test_
assert
.
.
.
.
.
def test_
assert
Then, in a terminal...
py.test Script.py
ó
#Revisa todo los tests y funciones dentro de la carpeta
pytest -v