[albatross-users] Re: Build failure with python 2.3: test failure

Dave Cole djc at object-craft.com.au
Fri Nov 7 11:04:56 EST 2003


On Thu, 2003-11-06 at 23:27, Fabian Fagerholm wrote:
> Hi!
> 
> I'm progressing on my Debian packaging of Albatross. Apart from the
> unsolved issue of documentation generation previously discussed on this
> list and in private mail, I have one remaining issue before the package
> is fit for introduction in Debian unstable (not counting issues not yet
> discovered, of course):
> 
> The test suite fails 10 of 61 tests when running with python 2.3.
> The relevant part of the build log is attached.
> 
> 
> The first class of errors is clear: the test expects the boolean values
> true and false to be represented as 1 and 0, respectively, but the
> python 2.3 interpreter outputs them as "True" and "False". This is
> because python 2.3 introduced a boolean type, whereas earlier versions
> relied on the C-style convention of using integers for boolean
> operations.

All of those failures are in a class of tests that would be quite ugly
and difficult to fix.  All of the tests in the doctest/ directory are
interactive examples that are used in the documentation.  The idea is
that by using the interactive examples as part of the test suite we can
be sure that the documentation is always correct (at least as far as
examples are concerned).

The only way I can see that we can fix these would require that we
either respectively redefine True and False to 1 and 0, or postprocess
the results of the test (very flakey).

> The other class of errors seems to be related to hashing or object
> pickling; the test expects a certain character sequence as "value"
> attribute in the hidden tag named "__albform__", but the python 2.2
> interpreter in Debian sid produces a different, and slightly longer
> sequence.

I am even less sure how we might fix these for multiple versions of
Python.  Maybe we could change the tests so they never display the
results of a pickle?

> Related documentation:
> http://www.python.org/doc/2.3/whatsnew/section-pep305.html
> http://www.python.org/2.3.2/NEWS.html
> 
> 
> I might drop building for python2.3 in the first version of the package,
> but on the other hand, it would make sense to fix it right from the
> start.
> 
> Perhaps the test could be made more dynamic by generating the expected
> results with the python interpreter before running the actual tests? I
> assume that a prerequisite for the tests is a working python
> interpreter?

Yup.

Hmm...  Maybe your suggestion would work.  Maybe we could create some of
the doctest files as part of the build process.  This would mean that
all pickle and repr strings would match the version of Python being used
to install Albatross.

It makes me a little scared in that it has the potential to make things
more flakey.

- Dave

-- 
http://www.object-craft.com.au




More information about the Albatross-users mailing list