Documentation test case fails on amd64

Fabian Fagerholm <[email protected]> Tue, 10 Oct 2006 18:40:44 +0300
Newsgroups gmane.comp.web.albatross.general
Message-ID <1160494844.5061.13.camel@localhost>
--===============1051737677==
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature";
	boundary="=-D8BdRAfqbFnRZGSPW0CH"


--=-D8BdRAfqbFnRZGSPW0CH
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Hi!

I got a Debian bug report about the albatross build failing on amd64.
The build fails on a documentation test because the Python built-in
hash() function doesn't return the same value on all platforms:

Testing "doctest/tags-value1" failed, Line 6: output does not match
example
Expected:
hash('spam') is 1626740519

Got:
hash('spam') is -1840390907728881881

I changed doc/doctest/tags-value1 to the following:

--8<--
>>> import albatross, md5
>>> ctx =3D albatross.SimpleContext('.')
>>> m =3D md5.new()
>>> m.update('spam')
>>> albatross.Template(ctx, '<magic>', '''
... int(m.hexdigest(), 16) is <al-value expr=3D"int(m.hexdigest(), 16)" whi=
tespace>
... ''').to_html(ctx)
>>> ctx.flush_content()
int(m.hexdigest(), 16) is 298574805507236127170346637616339707884L
--8<--

This should be portable (tested on i686 and amd64). You might want to
change the test for the next upstream version of albatross.

Cheers,
--=20
Fabian Fagerholm <[email protected]>

--=-D8BdRAfqbFnRZGSPW0CH
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQBFK77876VUNpZBmeIRAuQOAJ4mgOhlW3v5k+4FB6XaVZNT5e7/WACaAryl
qz+zU38SSCZP5QP/TH8deZQ=
=OkXw
-----END PGP SIGNATURE-----

--=-D8BdRAfqbFnRZGSPW0CH--


--===============1051737677==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Albatross-users mailing list
[email protected]
https://www.object-craft.com.au/cgi-bin/mailman/listinfo/albatross-users

--===============1051737677==--