[Zope3-dev] Odd functional test failure (testModuleListView)

Tim Peters tim.peters at gmail.com
Mon Apr 4 18:15:57 EDT 2005


[Stephan Richter]
> You still have to run the unit and functional tests together, so:
> 
> C:\Code\Zope3>\python23\python.exe test.py -vv zope.app.apidoc

Indeed!  It turns out only one of the unit tests is needed to provoke
the failure:

C:\Code\Zope3>\python23\python.exe test.py -vv zope.app.apidoc
Configuration file found.
Running UNIT tests at level 1
Running UNIT tests from C:\Code\Zope3
C:\Code\Zope3\src\zope\app\apidoc\zcmlmodule\README.txt ... ok

----------------------------------------------------------------------
Ran 13 tests in 0.328s

OK
Running FUNCTIONAL tests at level 1
Running FUNCTIONAL tests from C:\Code\Zope3
Parsing ftesting.zcml
testContentsView (zope.app.apidoc.browser.ftests.APIDocTests) ... ok
...
testModuleListView (zope.app.apidoc.browser.ftests.APIDocTests) ...

Failure in test testModuleListView (zope.app.apidoc.browser.ftests.APIDocTests)
Traceback (most recent call last):
  File "C:\Code\Zope3\src\zope\app\apidoc\browser\ftests.py", line 60,
in testModuleListView
    basic='mgr:mgrpw')
  File "C:\Code\Zope3\src\zope\app\testing\functional.py", line 371,
in checkForBrokenLinks
    self.fail("%s contains broken links:\n" % path
  File "C:\python23\lib\unittest.py", line 270, in fail
    raise self.failureException, msg
AssertionError: /++apidoc++/modulelist.html contains broken links:
  /++apidoc++/./++preferences++/apidoc/@@apidocMenu.html:      
ForbiddenAttribute: ('__getitem__', <zope.app.preference
.preference.PreferenceGroup object at 0x03297510>)
...

I disabled the other 17 unit tests it normally runs here "by hand"
(giving relevant methods an empty docstring, and stuffing "return
None" at the start of relevant test_suite() functions).

zope/app/apidoc/zcmlmodule/README.txt can be reduced to 3 lines then,
and the failure still occurs:

  >>> from zope.app.apidoc.zcmlmodule import ZCMLModule
  >>> module = ZCMLModule()
  >>> module._makeDocStructure()


More information about the Zope3-dev mailing list