You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@gump.apache.org by gu...@jakarta.apache.org on 2004/03/03 22:39:59 UTC
[Gump Wiki] New: GumpDevelopment
Date: 2004-03-03T13:39:58
Editor: AdamJack <aj...@apache.org>
Wiki: Gump Wiki
Page: GumpDevelopment
URL: http://wiki.apache.org/gump/GumpDevelopment
First whack
New Page:
= Gump Development =
Gump development is primarily in Python, see GumpPython.
Gump use Python 2.2, not 2.3, which means a set of features are not available.
= Debugging =
Gump uses the standard Python 'logging' package (bundled in 2.3) but has a copy of it [under python/] for 2.2. Typically the command line options of ''--debug'' and ''--verbose'' turn this on. Gump code current uses a single log instance (not one per package/module).
Write to the log using log.debug( )
A very useful feature in exception cases is the following, the exc_info=1 (there is no True in Pythong 2.2) logs a stack trace. The details object is often informative also.
try:
...
except Exception, details:
log.error('Problems problems...' + str(details), \
exc_info=1)
= Testing =
Unit tests (not yet converted to the real pyunit, a knock off but similar) are run using:
python gump/test/pyunit.py
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 name.
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org