Update of /cvsroot/happydoc/HappyDoc
In directory usw-pr-cvs1:/tmp/cvs-serv30774
Modified Files:
test_happydoc.py
Log Message:
Fixed a problem using webchecker where an output prefix was being
used.
Changed default to not run webchecker. Each HTML output test turns on
the feature if it is appropriate.
Added assertion to verify that the test does not report any errors
from webchecker.
Index: test_happydoc.py
===================================================================
RCS file: /cvsroot/happydoc/HappyDoc/test_happydoc.py,v
retrieving revision 1.83
retrieving revision 1.84
diff -C2 -d -r1.83 -r1.84
*** test_happydoc.py 12 May 2002 20:16:38 -0000 1.83
--- test_happydoc.py 13 May 2002 10:47:29 -0000 1.84
***************
*** 109,113 ****
return
! def runHappyDoc(self, modules=(), extraArgs=(), useWebChecker=WEBCHECKER_AVAILABLE):
#
# Fix up output directory variable
--- 109,113 ----
return
! def runHappyDoc(self, modules=(), extraArgs=(), useWebChecker=0):
#
# Fix up output directory variable
***************
*** 178,185 ****
c = webchecker.Checker()
c.setflags( checkext=0, verbose=2, nonames=1 )
! url = os.path.join(output_dir, 'index.html')
c.addroot( url )
c.run()
c.report()
#
--- 178,203 ----
c = webchecker.Checker()
c.setflags( checkext=0, verbose=2, nonames=1 )
!
! #
! # Work out the output prefix, if one was specified. This is
! # used to determine the real root filename, since it will
! # also include the prefix value.
! #
! prefix = ''
! for extra_arg in extraArgs:
! try:
! name, value = extra_arg.split('=')
! except ValueError:
! pass
! else:
! if name == 'formatter_filenamePrefix':
! prefix = value
! break
!
! url = os.path.join(output_dir, '%sindex.html' % prefix)
c.addroot( url )
c.run()
c.report()
+ assert not c.bad, "Link checker reports errors."
#
***************
*** 269,273 ****
assert (not self.runHappyDoc( (os.path.join('TestCases', 'test.py'),),
extraArgs=('-T', 'StdOut'),
- useWebChecker=1
)
), 'HTML to standard-output docset test failed.'
--- 287,290 ----
|