Hi François,

On Fri, Apr 08, 2011 at 02:08:57PM +1200, Francois Bissey wrote:
> Following an initial post by Paulo from mandriva I started 
> to look at using sage with python-2.7 (2.7.1 in fact).
> The news is two fold:
> 1) sage seems to work ok. It starts.
> 2) a good deal of the test suite is shot.

Thanks for the report!

> As a consequence of 2 it is difficult to work out which parts
> need to be checked.
> 
> The main issue is the migration to unittest2 back from python-3.
> In unittest2 the behavior of assertEqual as changed and by default
> doesn't know anything about derived type leading to a pile of stuff
> like this:
> 
> sage -t  -force_lib "devel/sage/sage/algebras/affine_nil_temperley_lieb.py"
> ^[[?
> 1034h**********************************************************************
> File 
> "/Users/frb15/Desktop/Gentoo/usr/share/sage/devel/sage/sage/algebras/affine_nil_temperley_lieb.py",
>  
> line 57:
>     sage: TestSuite(A).run()
> Expected nothing
> Got:
>     ...
>     AttributeError: 'InstanceTester' object has no attribute 
> '_type_equality_funcs'

Ok, this sounds very localized and should be easy to fix. I could
reproduce the problem on Python 2.6 by installing the backport of the
new version of unittest of 2.7 with:

    > sage -sh
    > easy_install unittest2

and replacing in sage/misc/sage_unittest.py:

    import unittest

by

    import unittest2 as unittest

The problem comes from the fact that InstanceTester.__init__ does not
call its base's __init__ as requested by the documentation of
unittest.TestCase (I take the blame for that). Adding it seems to fix
the problem, and so far does not cause trouble; let's see what the
buildbot will say. I just created #11156 for this and set you as
reviewer :-)

This does not fix everything since, with the new unittest, the error
reporting messages have changed a bit. But at least this should remove
most of the noise and give a better idea of the other issues that
could come up with Python 2.7.

Cheers,
                                Nicolas
--
Nicolas M. Thiéry "Isil" <nthi...@users.sf.net>
http://Nicolas.Thiery.name/

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to