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

John J Lee jjl at pobox.com
Tue Dec 9 11:01:53 EST 2003

On Sun, 7 Dec 2003, Raymond Hettinger wrote:
> Ideally, all repeatable, self verifying tests should be coded using the
> unittest module and placed in Lib/test.
> Some of tests in the module itself are being left intact for various
> reasons.  For instance, the random module still has a few tests that
> need a human eye to authenticate.  Some, like the ones in urllib2 are
> normally only run when someone updates the module -- they should be left
> in for convenience but could also have a counterpart in Lib/test so long
> as the test were marked to run only when -u network was enabled.  As you

(Ah, hadn't seen the test runner script, so didn't know about -u network,

OK, so I can PyUnit-ize the urllib2 functional tests (but leave them there
so functional tests can conveniently be run separately), and link them to
Lib/test (so all self-verifying tests get run there).

One problem, though: doesn't putting functional tests in Lib/test throw
off Walter Dorwald's unit test coverage numbers?  Perhaps there should be
a 'functional' resource for test_support.use_resources (so the tests can
be run with -uall, -functional for coverage measurements)?



More information about the Python-Dev mailing list