#15109: Failing doctests in sage.matrix.matrix_domain_dense
-------------------------------------+--------------------------------
       Reporter:  caruso             |        Owner:
           Type:  defect             |       Status:  needs_review
       Priority:  blocker            |    Milestone:  sage-5.12
      Component:  doctest framework  |   Resolution:
       Keywords:  failing doctests   |    Merged in:
        Authors:  Xavier Caruso      |    Reviewers:  Travis Scrimshaw
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
   Dependencies:                     |     Stopgaps:
-------------------------------------+--------------------------------

Comment (by caruso):

 On a clean `sage-5.12.beta3`, I get:

 {{{
 sage@irma-cethop ~/sage-5.12.beta3/devel/sage/sage/matrix $ sage-5.12 -t
 matrix_domain_dense.pyx
 Running doctests with ID 2013-08-28-08-09-58-e444f178.
 Doctesting 1 file.
 sage -t matrix_domain_dense.pyx
 **********************************************************************
 File "matrix_domain_dense.pyx", line 67, in
 sage.matrix.matrix_domain_dense.Matrix_domain_dense.charpoly
 Failed example:
     R = PolynomialRing(IntegerRing(),2); x,y = R.gens()
 Exception raised:
     Traceback (most recent call last):
       File "/home2/sage/sage-5.12.beta3/local/lib/python2.7/site-
 packages/sage/doctest/forker.py", line 479, in _run
         self.execute(example, compiled, test.globs)
       File "/home2/sage/sage-5.12.beta3/local/lib/python2.7/site-
 packages/sage/doctest/forker.py", line 838, in execute
         exec compiled in globs
       File "<doctest
 sage.matrix.matrix_domain_dense.Matrix_domain_dense.charpoly[12]>", line
 1, in <module>
         R = PolynomialRing(IntegerRing(),Integer(2)); x,y = R.gens()
       File "/home2/sage/sage-5.12.beta3/local/lib/python2.7/site-
 packages/sage/rings/polynomial/polynomial_ring_constructor.py", line 448,
 in PolynomialRing
         raise TypeError("You must specify the names of the variables.")
     TypeError: You must specify the names of the variables.
 **********************************************************************
 File "matrix_domain_dense.pyx", line 68, in
 sage.matrix.matrix_domain_dense.Matrix_domain_dense.charpoly
 Failed example:
     A = MatrixSpace(R,2)([x, y, x^2, y^2])
 Exception raised:
     Traceback (most recent call last):
       File "/home2/sage/sage-5.12.beta3/local/lib/python2.7/site-
 packages/sage/doctest/forker.py", line 479, in _run
         self.execute(example, compiled, test.globs)
       File "/home2/sage/sage-5.12.beta3/local/lib/python2.7/site-
 packages/sage/doctest/forker.py", line 838, in execute
         exec compiled in globs
       File "<doctest
 sage.matrix.matrix_domain_dense.Matrix_domain_dense.charpoly[13]>", line
 1, in <module>
         A = MatrixSpace(R,Integer(2))([x, y, x**Integer(2),
 y**Integer(2)])
     NameError: name 'y' is not defined
 **********************************************************************
 File "matrix_domain_dense.pyx", line 70, in
 sage.matrix.matrix_domain_dense.Matrix_domain_dense.charpoly
 Failed example:
     f
 Expected:
     x^2 + (-1*x1^2 - x0)*x + x0*x1^2 - x0^2*x1
 Got:
     x^2 - 5*x - 2
 **********************************************************************
 File "matrix_domain_dense.pyx", line 75, in
 sage.matrix.matrix_domain_dense.Matrix_domain_dense.charpoly
 Failed example:
     f.parent()._assign_names("Z")
 Exception raised:
     Traceback (most recent call last):
       File "/home2/sage/sage-5.12.beta3/local/lib/python2.7/site-
 packages/sage/doctest/forker.py", line 479, in _run
         self.execute(example, compiled, test.globs)
       File "/home2/sage/sage-5.12.beta3/local/lib/python2.7/site-
 packages/sage/doctest/forker.py", line 838, in execute
         exec compiled in globs
       File "<doctest
 sage.matrix.matrix_domain_dense.Matrix_domain_dense.charpoly[16]>", line
 1, in <module>
         f.parent()._assign_names("Z")
       File "parent_gens.pyx", line 329, in
 sage.structure.parent_gens.ParentWithGens._assign_names
 (sage/structure/parent_gens.c:3464)
       File "category_object.pyx", line 416, in
 sage.structure.category_object.CategoryObject._assign_names
 (sage/structure/category_object.c:4500)
     ValueError: variable names cannot be changed after object creation.
 **********************************************************************
 File "matrix_domain_dense.pyx", line 76, in
 sage.matrix.matrix_domain_dense.Matrix_domain_dense.charpoly
 Failed example:
     f
 Expected:
     Z^2 + (-1*x1^2 - x0)*Z + x0*x1^2 - x0^2*x1
 Got:
     x^2 - 5*x - 2
 **********************************************************************
 File "matrix_domain_dense.pyx", line 82, in
 sage.matrix.matrix_domain_dense.Matrix_domain_dense.charpoly
 Failed example:
     A.charpoly(bound=2)
 Exception raised:
     Traceback (most recent call last):
       File "/home2/sage/sage-5.12.beta3/local/lib/python2.7/site-
 packages/sage/doctest/forker.py", line 479, in _run
         self.execute(example, compiled, test.globs)
       File "/home2/sage/sage-5.12.beta3/local/lib/python2.7/site-
 packages/sage/doctest/forker.py", line 838, in execute
         exec compiled in globs
       File "<doctest
 sage.matrix.matrix_domain_dense.Matrix_domain_dense.charpoly[19]>", line
 1, in <module>
         A.charpoly(bound=Integer(2))
       File "matrix_integer_dense.pyx", line 986, in
 sage.matrix.matrix_integer_dense.Matrix_integer_dense.charpoly
 (sage/matrix/matrix_integer_dense.c:11541)
         def charpoly(self, var='x', algorithm='linbox'):
     TypeError: charpoly() got an unexpected keyword argument 'bound'
 **********************************************************************
 File "matrix_domain_dense.pyx", line 103, in
 sage.matrix.matrix_domain_dense.Matrix_domain_dense.determinant
 Failed example:
     R = PolynomialRing(IntegerRing(),2); x,y = R.gens()
 Exception raised:
     Traceback (most recent call last):
       File "/home2/sage/sage-5.12.beta3/local/lib/python2.7/site-
 packages/sage/doctest/forker.py", line 479, in _run
         self.execute(example, compiled, test.globs)
       File "/home2/sage/sage-5.12.beta3/local/lib/python2.7/site-
 packages/sage/doctest/forker.py", line 838, in execute
         exec compiled in globs
       File "<doctest
 sage.matrix.matrix_domain_dense.Matrix_domain_dense.determinant[0]>", line
 1, in <module>
         R = PolynomialRing(IntegerRing(),Integer(2)); x,y = R.gens()
       File "/home2/sage/sage-5.12.beta3/local/lib/python2.7/site-
 packages/sage/rings/polynomial/polynomial_ring_constructor.py", line 448,
 in PolynomialRing
         raise TypeError("You must specify the names of the variables.")
     TypeError: You must specify the names of the variables.
 **********************************************************************
 File "matrix_domain_dense.pyx", line 104, in
 sage.matrix.matrix_domain_dense.Matrix_domain_dense.determinant
 Failed example:
     A = MatrixSpace(R,2)([x, y, x**2, y**2])
 Exception raised:
     Traceback (most recent call last):
       File "/home2/sage/sage-5.12.beta3/local/lib/python2.7/site-
 packages/sage/doctest/forker.py", line 479, in _run
         self.execute(example, compiled, test.globs)
       File "/home2/sage/sage-5.12.beta3/local/lib/python2.7/site-
 packages/sage/doctest/forker.py", line 838, in execute
         exec compiled in globs
       File "<doctest
 sage.matrix.matrix_domain_dense.Matrix_domain_dense.determinant[1]>", line
 1, in <module>
         A = MatrixSpace(R,Integer(2))([x, y, x**Integer(2),
 y**Integer(2)])
       File "classcall_metaclass.pyx", line 330, in
 sage.misc.classcall_metaclass.ClasscallMetaclass.__call__
 (sage/misc/classcall_metaclass.c:1224)
       File "/home2/sage/sage-5.12.beta3/local/lib/python2.7/site-
 packages/sage/matrix/matrix_space.py", line 215, in __classcall__
         if base_ring not in _Rings:
       File "category_singleton.pyx", line 81, in
 
sage.categories.category_singleton.Category_contains_method_by_parent_class.__call__
 (sage/categories/category_singleton.c:1428)
     TypeError: descriptor 'category' of 'sage.structure.parent.Parent'
 object needs an argument
 **********************************************************************
 File "matrix_domain_dense.pyx", line 105, in
 sage.matrix.matrix_domain_dense.Matrix_domain_dense.determinant
 Failed example:
     A.determinant()
 Exception raised:
     Traceback (most recent call last):
       File "/home2/sage/sage-5.12.beta3/local/lib/python2.7/site-
 packages/sage/doctest/forker.py", line 479, in _run
         self.execute(example, compiled, test.globs)
       File "/home2/sage/sage-5.12.beta3/local/lib/python2.7/site-
 packages/sage/doctest/forker.py", line 838, in execute
         exec compiled in globs
       File "<doctest
 sage.matrix.matrix_domain_dense.Matrix_domain_dense.determinant[2]>", line
 1, in <module>
         A.determinant()
     NameError: name 'A' is not defined
 **********************************************************************
 File "matrix_domain_dense.pyx", line 142, in
 sage.matrix.matrix_domain_dense.Matrix_domain_dense.is_invertible
 Failed example:
     R = PolynomialRing(IntegerRing())
 Exception raised:
     Traceback (most recent call last):
       File "/home2/sage/sage-5.12.beta3/local/lib/python2.7/site-
 packages/sage/doctest/forker.py", line 479, in _run
         self.execute(example, compiled, test.globs)
       File "/home2/sage/sage-5.12.beta3/local/lib/python2.7/site-
 packages/sage/doctest/forker.py", line 838, in execute
         exec compiled in globs
       File "<doctest
 sage.matrix.matrix_domain_dense.Matrix_domain_dense.is_invertible[7]>",
 line 1, in <module>
         R = PolynomialRing(IntegerRing())
       File "/home2/sage/sage-5.12.beta3/local/lib/python2.7/site-
 packages/sage/rings/polynomial/polynomial_ring_constructor.py", line 448,
 in PolynomialRing
         raise TypeError("You must specify the names of the variables.")
     TypeError: You must specify the names of the variables.
 **********************************************************************
 File "matrix_domain_dense.pyx", line 143, in
 sage.matrix.matrix_domain_dense.Matrix_domain_dense.is_invertible
 Failed example:
     x = R.gen()
 Exception raised:
     Traceback (most recent call last):
       File "/home2/sage/sage-5.12.beta3/local/lib/python2.7/site-
 packages/sage/doctest/forker.py", line 479, in _run
         self.execute(example, compiled, test.globs)
       File "/home2/sage/sage-5.12.beta3/local/lib/python2.7/site-
 packages/sage/doctest/forker.py", line 838, in execute
         exec compiled in globs
       File "<doctest
 sage.matrix.matrix_domain_dense.Matrix_domain_dense.is_invertible[8]>",
 line 1, in <module>
         x = R.gen()
     AttributeError: type object 'R' has no attribute 'gen'
 **********************************************************************
 File "matrix_domain_dense.pyx", line 144, in
 sage.matrix.matrix_domain_dense.Matrix_domain_dense.is_invertible
 Failed example:
     A = MatrixSpace(R,2)([1,x,0,-1])
 Exception raised:
     Traceback (most recent call last):
       File "/home2/sage/sage-5.12.beta3/local/lib/python2.7/site-
 packages/sage/doctest/forker.py", line 479, in _run
         self.execute(example, compiled, test.globs)
       File "/home2/sage/sage-5.12.beta3/local/lib/python2.7/site-
 packages/sage/doctest/forker.py", line 838, in execute
         exec compiled in globs
       File "<doctest
 sage.matrix.matrix_domain_dense.Matrix_domain_dense.is_invertible[9]>",
 line 1, in <module>
         A =
 MatrixSpace(R,Integer(2))([Integer(1),x,Integer(0),-Integer(1)])
       File "classcall_metaclass.pyx", line 330, in
 sage.misc.classcall_metaclass.ClasscallMetaclass.__call__
 (sage/misc/classcall_metaclass.c:1224)
       File "/home2/sage/sage-5.12.beta3/local/lib/python2.7/site-
 packages/sage/matrix/matrix_space.py", line 215, in __classcall__
         if base_ring not in _Rings:
       File "category_singleton.pyx", line 81, in
 
sage.categories.category_singleton.Category_contains_method_by_parent_class.__call__
 (sage/categories/category_singleton.c:1428)
     TypeError: descriptor 'category' of 'sage.structure.parent.Parent'
 object needs an argument
 **********************************************************************
 File "matrix_domain_dense.pyx", line 147, in
 sage.matrix.matrix_domain_dense.Matrix_domain_dense.is_invertible
 Failed example:
     ~A
 Expected:
     [ 1  x]
     [ 0 -1]
 Got:
     [ 1 10]
     [ 0 -1]
 **********************************************************************
 3 items had failures:
    6 of  23 in
 sage.matrix.matrix_domain_dense.Matrix_domain_dense.charpoly
    3 of   4 in
 sage.matrix.matrix_domain_dense.Matrix_domain_dense.determinant
    4 of  13 in
 sage.matrix.matrix_domain_dense.Matrix_domain_dense.is_invertible
     [47 tests, 13 failures, 0.30 s]
 ----------------------------------------------------------------------
 sage -t matrix_domain_dense.pyx  # 13 doctests failed
 ----------------------------------------------------------------------
 Total time for all tests: 0.4 seconds
     cpu time: 0.3 seconds
     cumulative wall time: 0.3 seconds
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/15109#comment:6>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to