Art of Unit Testing
Paul Moore
paul.moore at uk.origin-it.com
Mon Aug 20 05:45:58 EDT 2001
On Sat, 18 Aug 2001 22:32:08 +0200, "Grace" <nospam at nospam.com> wrote:
>When I look at your code, it seems like it's testing DB itself rather than
>the python code. PyUnit is not intended for testing DB engines per se.
Agreed. It was an example. I couldn't think of a small, realistic, example.
Sorry.
How about a GUI test example, like in the docs. setUp creates a widget,
tearDown destroys it. In between, tests do hundreds of things like
setSize(10,10), assert getSize() == (10, 10). You get the idea. OK, so
creating a widget *might* not be too expensive - but it might be (you'll force
me to suggest a widget which maintains a database connection, if you're not
careful :-)
Paul.
More information about the Python-list
mailing list