Hi all,

I am looking for some understanding into the various test routines run
by TestSuite.  The problem is that I'm working on a new parent on
which TestSuite fails, and I would like to understand whether this is
due to me not understanding the relevant sage internals (very likely)
or if I can just ignore this for now.  I derived some hope from

http://groups.google.com/group/sage-devel/browse_thread/thread/a42ace80078373b4/

More specifically, I have a class "DifferentialForms" which derives
from Algebra, and whose init method contains the following (I don't
know if this is relevant):

    class DifferentialForms(Algebra):
        def __init__(...):
            from sage.categories.graded_algebras_with_basis \
                import GradedAlgebrasWithBasis
            from sage.structure.parent_gens import ParentWithGens

            # Other code

            ParentWithGens.__init__(self, SR, \
                category = GradedAlgebrasWithBasis(SR))

When I run the test method

   sage: F = DifferentialForms()
   sage: F._test_category()

everything works well (no output), but when I run F._test_elements() I
get an error in ... _test_category().  The precise error is listed
below, but the traceback tells me that the problem arose in
element.pyx:

    if not is_extension_type(self.__class__):
        # For usual Python classes, that should be done with
        # standard inheritance
        tester.assert_(isinstance(self,
self.parent().category().element_class))

Did I mess up with my use of the sage categories somewhere?  Any help
would be much appreciated, and I can readily supply additional
information.

Thanks!
Joris Vankerschaver

Exception in running F._test_elements():


Failure in _test_category:
  Traceback (most recent call last):
    File "/Applications/sage/local/lib/python2.6/site-packages/sage/
misc/sage_unittest.py", line 275, in run
      test_method(tester = tester)
    File "element.pyx", line 472, in
sage.structure.element.Element._test_category (sage/structure/
element.c:3688)
    File "/Applications/sage/local/lib/python/unittest.py", line 325,
in failUnless
      if not expr: raise self.failureException, msg
  AssertionError
  ------------------------------------------------------------
  The following tests failed: _test_category
Failure in _test_elements
The following tests failed: _test_elements

-- 
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