[MERGE] Make the test suite run under Python 2.7a0
John Arbash Meinel
john at arbash-meinel.com
Fri Mar 27 17:26:28 GMT 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Andrew Bennetts wrote:
> This patch makes the test suite run, although not pass, with Python's trunk
> (a.k.a. Python 2.7a0). This is pretty low priority; Python 2.7 is still a
> moving target, but this might make things a little easier for people interested
> in testing and/or benchmarking the latest and greatest version of Python.
>
> First, it seems Python has incompatibly changed sys.version_info so that it
> isn't a tuple anymore, so it can't be passed to % of a str. I think this is
> perhaps a serious enough bug in 2.7a0 that it should be filed in Python's
> tracker, but the workaround is simple. It certainly seems weird to me that
> Python has PySequenceStruct *and* collections.namedtuple to do essentially
> the same thing with completely different implementations.
>
> Second, unittest.TestCase no longer has _exc_info, which is fair enough, it
> didn't really do anything useful beyond plain sys.exc_info() (trimming
> uninteresting stack frames happens elsewhere). It might be nice if Python
> 2.7 at least gave a DeprecationWarning, but as it's an undocumented private
> method I guess all bets are off (even though it's one that people writing
> their own TestCase.run would have wanted to use to maximise
> compatibility...).
>
> Finally, I even fix a genuine test failure due to an obvious test bug in
> test_http. Several other tests in test_http still fail though, due to
> unexpected unicode objects, it appears that the config machinery is now
> returning unicode passwords from AuthenicationConfig now for some reason.
>
> -Andrew.
>
>
BB:approve
Though I'll comment that you could have left TestCase.exc_info() and
just had it return sys.exc_info().
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAknNDEQACgkQJdeBCYSNAAM7zgCeP+VYxOBYQ0H4snfm/Bgd5iFN
Fd8AoJN/TmwHUX4QCbgn38Ll6gnn9Dsw
=9XGe
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list