Message6379

Author JohnL
Recipients JohnL
Date 2011-02-03.04:25:49
SpamBayes Score 9.180343e-06
Marked as misclassified No
Message-id <1296707149.56.0.267959873894.issue1703@psf.upfronthosting.co.za>
In-reply-to
Content
The doctest doc locate here:
http://www.jython.org/docs/library/doctest.html
shows example code such as:
if __name__ == "__main__":
    import doctest
    doctest.testmod()
This code fails with error message:
    TypeError: testmod() takes at least 1 argument (0 given)
My guess is that the correct code would read:
    import doctest, thismodule
    doctest.testmod(thismodule)
provided, of course, that the example had been saved in the file thismodule.py
History
Date User Action Args
2011-02-03 04:25:49JohnLsetrecipients: + JohnL
2011-02-03 04:25:49JohnLsetmessageid: <1296707149.56.0.267959873894.issue1703@psf.upfronthosting.co.za>
2011-02-03 04:25:49JohnLlinkissue1703 messages
2011-02-03 04:25:49JohnLcreate