Using other tools with unittest?

Edward K. Ream edreamleo at charter.net
Tue Nov 18 23:11:18 CET 2003


Has anyone used tools like pychecker (or even Python's own debugger or
profiler) during unit testing?  Here are some things that might be natural
to do:

1. pychecker can run all kinds of fancy tests on code.  I'm wondering
whether these tests could be incorporated somehow into individual unit
tests.  For example, one might use pychecker to assert that a subclass does,
or does not, override a method of a base class.  Yes, one could write that
test "by hand".  The question is: how good is pychecker for this sort of
thing?  Anyone have any experience?

2. Python's debugger is simple because Python so helpfully provides the
sys.settrace function.  Has anyone used sys.settrace for unit testing?  For
example, suppose you wanted to make a list of the methods that are exercised
by a test suite.  The tracing function registered by sys.settrace could
easily do this.  Etc.

3 In a slightly different direction, has someone used a simulation of
aspect-oriented programming in Python to make statements about test
coverage, or for other testing purposes?

Thanks.

Edward
--------------------------------------------------------------------
Edward K. Ream   email:  edreamleo at charter.net
Leo: Literate Editor with Outlines
Leo: http://webpages.charter.net/edreamleo/front.html
--------------------------------------------------------------------






More information about the Python-list mailing list