gump-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Gump Wiki] Updated: GumpDevelopment
Date Mon, 19 Jul 2004 14:48:47 GMT
   Date: 2004-07-19T07:48:47
   Editor: AdamJack <>
   Wiki: Gump Wiki
   Page: GumpDevelopment

   Information on adding unit tests

Change Log:

@@ -18,7 +18,7 @@
   [ Gump PyDoc]
-See als othe code documentation at '''GumpCode'''.
+See also the code documentation at '''GumpCode'''.
 = Debugging =
@@ -43,3 +43,17 @@
   python gump/test/ 
 One can run a single test (or set of tests) by passing a wildcarded (filename-like not regexp)
expression. e.g. *Nag for all nag tests. This matches the method (test) name, not test suite
+== Adding Unit Tests ==
+First, create a sub-class of UnitTestSuite (in and implement {{{__init__()}}},
and the {{{setUp()}}} and/or {{{tearDown()}}} as with any other *unit style (e.g. junit).
Then create methods {{{testXXX()}}} that either raise exceptions (if they fail) or use {{{self.assertXXX()}}}
style methods (which raise exception when assertions fail).
+Second (ugly) add a segment like like this to, to register the new suite:
+    from import XXXTestSuite  
+    runner.addSuite(XXXTestSuite())
+Basically, when pyunit runs it walks through all test suites attempting to match all {{{testXXX()}}}
methods to the provided pattern (or * for all) and when it finds them, it runs them (with
{{{setUp() and tearDown()}}} run before/after). Any failure (exception) is caught and reported

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message