Im quite confused why
doctest.testmod() is calling the test functions in a strange order
from doctest import testmod def test_forwrite(): ''' >>> test_forwrite() OP: Done ''' write() def test_forread(): ''' >>> test_forread() OP: Done ''' read() if __name__ == "__main__": testmod(verbose = True)
Why regardless of the order in which its defined
test_forread() gets tested first always.