[Happydoc-checkins] CVS: HappyDoc3/happydoclib tests.py,NONE,1.1
Brought to you by:
doughellmann,
krlosaqp
From: Doug H. <dou...@us...> - 2002-12-15 17:01:15
|
Update of /cvsroot/happydoc/HappyDoc3/happydoclib In directory sc8-pr-cvs1:/tmp/cvs-serv1174/happydoclib Added Files: tests.py Log Message: Base class for tests which run HappyDoc with arguments as though it was being executed from the command line. --- NEW FILE: tests.py --- #!/usr/bin/env python # # $Id: tests.py,v 1.1 2002/12/15 17:01:11 doughellmann Exp $ # # Copyright 2002 Doug Hellmann. # # # All Rights Reserved # # Permission to use, copy, modify, and distribute this software and # its documentation for any purpose and without fee is hereby # granted, provided that the above copyright notice appear in all # copies and that both that copyright notice and this permission # notice appear in supporting documentation, and that the name of Doug # Hellmann not be used in advertising or publicity pertaining to # distribution of the software without specific, written prior # permission. # # DOUG HELLMANN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, # INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN # NO EVENT SHALL DOUG HELLMANN BE LIABLE FOR ANY SPECIAL, INDIRECT OR # CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS # OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, # NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. # """Tests for HappyDoc. """ __rcs_info__ = { # # Creation Information # 'module_name' : '$RCSfile: tests.py,v $', 'rcs_id' : '$Id: tests.py,v 1.1 2002/12/15 17:01:11 doughellmann Exp $', 'creator' : 'Doug Hellmann <do...@he...>', 'project' : 'UNSPECIFIED', 'created' : 'Sun, 15-Dec-2002 09:39:20 EST', # # Current Information # 'author' : '$Author: doughellmann $', 'version' : '$Revision: 1.1 $', 'date' : '$Date: 2002/12/15 17:01:11 $', } try: __version__ = __rcs_info__['version'].split(' ')[1] except: __version__ = '0.0' # # Import system modules # import os import unittest # # Import Local modules # import happydoclib # # Module # class HappyDocRunTest(unittest.TestCase): TEST_OUTPUT_DIRECTORY_BASE = 'TestOutput' def getTestName(self): return self._TestCase__testMethodName def getOutputDirectory(self): return os.path.join(self.TEST_OUTPUT_DIRECTORY_BASE, self.getTestName(), ) def runHappyDoc(self, *args): default_args = ( '-q', '-d', self.getOutputDirectory(), '-t', self.getTestName(), ) #default_args = ( '-d', self.getOutputDirectory(), ) all_args = default_args + args happydoc = happydoclib.HappyDoc(all_args) happydoc.run() return |