Re: [sage-devel] TestSuite: _test_category() for an element

2010-04-17 Thread Alex Ghitza
Hi Nicolas, On Sat, 17 Apr 2010 16:27:36 +0200, "Nicolas M. Thiery" wrote: > Ok. So e is indeed not in Algebras.element_class. > > The thing is that this inheritance AlgebraElement -> > Algebras.element_class is not set up statically; instead, for P a > parent, > > P.element_class > >

Re: [sage-devel] TestSuite: _test_category() for an element

2010-04-17 Thread Alex Ghitza
Hi Florent, On Sat, 17 Apr 2010 17:49:23 +0200, Florent Hivert wrote: > Hi Alex, > > > * we have a class Parent_class which inherits from Algebra > > * we have a class Element_class which inherits from AlgebraElement > > Just a stupid question which pops in my mind: how did you tells th

Re: [sage-devel] TestSuite: _test_category() for an element

2010-04-17 Thread Florent Hivert
Hi Alex, > * we have a class Parent_class which inherits from Algebra > * we have a class Element_class which inherits from AlgebraElement Just a stupid question which pops in my mind: how did you tells the class Parent_class that its element are of class Element_class how did you construct

Re: [sage-devel] TestSuite: _test_category() for an element

2010-04-17 Thread Alex Ghitza
On Sat, 17 Apr 2010 15:42:30 +0200, "Nicolas M. Thiery" wrote: > Strange. Just to make 100% sure: can you give me the result of: > > sage: e.__class__.mro() > sage: e.parent().category().element_class.mro() Sure: sage: e.__class__.mro() [, , , , , , ] sage: e.parent().cate

Re: [sage-devel] TestSuite: _test_category() for an element

2010-04-17 Thread Nicolas M. Thiery
On Sat, Apr 17, 2010 at 10:48:22PM +1000, Alex Ghitza wrote: > On Sat, 17 Apr 2010 14:22:30 +0200, Florent Hivert > wrote: > > > Unfortunately, there is a test that I'm not yet able to fix, namely > > > _test_category for an element class we define. Let me try to say what > > > the situation is

Re: [sage-devel] TestSuite: _test_category() for an element

2010-04-17 Thread Alex Ghitza
On Sat, 17 Apr 2010 14:22:30 +0200, Florent Hivert wrote: > > Unfortunately, there is a test that I'm not yet able to fix, namely > > _test_category for an element class we define. Let me try to say what > > the situation is without going into irrelevant details: > > > > * we have a class Paren

Re: [sage-devel] TestSuite: _test_category() for an element

2010-04-17 Thread Florent Hivert
Hi Alex, > I'm trying to insert a TestSuite(s).run() doctest in some code we're > polishing. So far it helped me find a couple of bugs, so I'm quite > impressed with the whole concept. > > Unfortunately, there is a test that I'm not yet able to fix, namely > _test_category for an element c

[sage-devel] TestSuite: _test_category() for an element

2010-04-17 Thread Alex Ghitza
Hi, I'm trying to insert a TestSuite(s).run() doctest in some code we're polishing. So far it helped me find a couple of bugs, so I'm quite impressed with the whole concept. Unfortunately, there is a test that I'm not yet able to fix, namely _test_category for an element class we define. Let m