[Python-Dev] Conventions for functional tests, PyUnit?

John J Lee jjl at pobox.com
Sun Dec 7 19:51:00 EST 2003

First, it seems the standard place for functional tests is in

if __name__ == "__main__"


Some (most?) of the standard library functional tests seem to be a bunch
of commands that are simply supposed not to crash (urllib2) or that are
little test programs that need to be invoked with the correct arguments

Would it be a good thing to attempt to PyUnit-ize these functional tests
so you can run them with no command line arguments and get clear
indications of how many tests are passing and failing?  Or, if not PyUnit,
just ad-hoc tests that indicate success / failure?

Should some be left intact and new functional tests added?  For example,
ftplib has a little test program tacked on at its end, perhaps that should
be retained in some form?


More information about the Python-Dev mailing list