Hi!
My knowledge of Python and Pythonista is frankly low. Maybe you'll find this too easy and evident, but I've needed sometime to understand how to use pytest in Pythonista.
Here is an script showing how to use it:
import pytest
def cuadrado(x):
return x*x
def test():
assert(cuadrado(2)==5)
pytest.main()
Just import pytest and import or define your functions. Then, define your test and, finally, put pytest.main() to run the tests. That last line was the thing I couldn't find when I was reading the pytest tutorial.
Javier
Ps. Sorry for the bad English.