When you need to run unit-test and make documentation for it with Python. doctest and sphinx is the one of the best choices you can have.
"""
This is the "example" module.
The example module supplies one function, factorial(). For example,
>>> factorial(5)
120
"""
def factorial(n):
"""Return the factorial of n, an exact integer >= 0.
If the result is small enough to fit in an int, return an int.
Else return a long.
>>> [factorial(n) for n in range(6)]
[1, 1, 2, 6, 24, 120]
"""
if n == 0:
return 1
else:
return n * factorial(n-1)
if __name__ == "__main__":
import doctest
doctest.testmod()
Then execute `sphinx-quickstart`, modify `conf.py` to make Python importable the source code directory. Finally, run
make html.
An iOS mobile app development course focuses on building real-world applications. It emphasizes UI design and performance. This ios mobile app development course builds job-ready skills. It is dependable.
ReplyDelete“Helpful post! Our UI/UX program teaches practical design skills for user-friendly digital products.” online course ui ux
ReplyDelete