[Zope-Coders] Linux Test Results - Zope HEAD - failures:1
Fred L. Drake, Jr.
fdrake@acm.org
Thu, 22 Aug 2002 22:37:21 -0400
zope-tests@squishdot.org writes:
> Python Version:2.1.3 (#1, May 20 2002, 12:02:16)
> [GCC 2.95.2 20000220 (Debian GNU/Linux)]
>
> Modules included:
> Zope (HEAD)
>
> Traceback (most recent call last):
> File "/stuff/chrisw/ZopeTests/sandbox/Zope/lib/python/TAL/runtest.py", line 92, in main
> driver.main()
> File "/stuff/chrisw/ZopeTests/sandbox/Zope/lib/python/TAL/driver.py", line 77, in main
> it = compilefile(file, mode)
> File "/stuff/chrisw/ZopeTests/sandbox/Zope/lib/python/TAL/driver.py", line 106, in compilefile
> p.parseFile(file)
> File "/stuff/chrisw/ZopeTests/sandbox/Zope/lib/python/TAL/XMLParser.py", line 77, in parseFile
> self.parseStream(open(filename))
> File "/stuff/chrisw/ZopeTests/sandbox/Zope/lib/python/TAL/XMLParser.py", line 87, in parseStream
> self.parser.ParseFile(stream)
> ExpatError: undefined entity: line 18, column 2
Ok, here's the scoop: There is a bug in all recent versions of Expat
(at least; haven't tested with anything before 1.95.2, but I expect
the same result). In this test, the document includes a DOCTYPE
declaration that specifies an external DTD subset, which is ignored by
the parser (as expected and intended in this application). This means
that there is an explicit statement in the document that external
structure information is available, and no statement that says we
don't need it to understand the structure of the document
(standalone='true' would be such a statement). The document content
refers to an unknown entity, which the parser is required to assume
may have been defined by the external subset which wasn't loaded, so
this is still a well-formed document. The exception that's being
raised should only occur if the information loaded by the parser is
sufficient to prove that the entity cannot have been declared (we'd
have to have read all external parameter entities), so this exception
should not have been raised.
This is a bug in Expat itself, not the Python binding. We've fixed
the version of Expat in CVS (see www.libexpat.org); you can re-build
Python and/or PyXML (whichever you're using for XML support) with the
CVS version of Expat to get the fix. There may be a formal release of
Expat next week to make it easier to pick up the fix. (Installing
from RPMs made switching Expat versions during testing trivial, since
Python 2.2.1 was linking to the dynamic library!)
> ======================================================================
> FAIL: runTest (test_files.FileTestCase)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "test_files.py", line 37, in runTest
> File "/usr/local/lib/python2.1/unittest.py", line 241, in fail
> raise self.failureException, msg
> AssertionError: output for /stuff/chrisw/ZopeTests/sandbox/Zope/lib/python/TAL/tests/input/test01.xml didn't match
In spite of the pathetic "didn't match" message, this is the same
error, just masked by too many layers of test drivers. ;-(
-Fred
--
Fred L. Drake, Jr. <fdrake at acm.org>
PythonLabs at Zope Corporation