[Happydoc-checkins] CVS: HappyDoc/happydoclib StreamFlushTest.py,1.2,1.3
Brought to you by:
doughellmann,
krlosaqp
From: Doug H. <dou...@us...> - 2002-01-31 13:20:28
|
Update of /cvsroot/happydoc/HappyDoc/happydoclib In directory usw-pr-cvs1:/tmp/cvs-serv15847 Modified Files: StreamFlushTest.py Log Message: Add a status message function so that different verbosity levels can produce different output. Index: StreamFlushTest.py =================================================================== RCS file: /cvsroot/happydoc/HappyDoc/happydoclib/StreamFlushTest.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** StreamFlushTest.py 2001/11/25 14:13:06 1.2 --- StreamFlushTest.py 2002/01/31 13:20:25 1.3 *************** *** 116,126 **** verboseLevel = verboseLevel ! def __init__(self, methodName, outputDir=DEFAULT_OUTPUT_DIR): "Initialize" self.name = methodName self.output_dir = outputDir unittest.TestCase.__init__(self, methodName) import happydoclib.path self.path_module = happydoclib.path return --- 116,133 ---- verboseLevel = verboseLevel ! def __init__(self, methodName, outputDir=DEFAULT_OUTPUT_DIR, ! statusMessageFunc=None): "Initialize" self.name = methodName self.output_dir = outputDir + self.status_message_func = statusMessageFunc unittest.TestCase.__init__(self, methodName) import happydoclib.path self.path_module = happydoclib.path + return + + def statusMessage(self, message, level=1): + if self.status_message_func: + self.status_message_func(message, level) return |