[Python-Dev] Conventions for functional tests, PyUnit? (original) (raw)

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"

right?

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 (ftplib).

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?

John



More information about the Python-Dev mailing list