background image

Running Doctest

if ___name__ == "__main__":

    import doctest
    doctest.testmod(verbose=True)

Run doctest using command line:

Or run doctest in the code:

cmd> 

python -m doctest -v listutil.py

2 tests in 5 items.
2 passed and 0 failed.
Test passed.

Comments:

Unit Testing in Python

navigate_before navigate_next