#15475: Reenable broken doctests in #15473 and #15476 when #10963 is merged
-------------------------------------+-------------------------------------
       Reporter:  darij              |        Owner:
           Type:  defect             |       Status:  needs_work
       Priority:  minor              |    Milestone:  sage-6.3
      Component:  categories         |   Resolution:
       Keywords:  10963,             |    Merged in:
  categories, c3                     |    Reviewers:
        Authors:                     |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  ef918e33132d7bf77dd999696a0efd891d831377
  public/categories/15475            |     Stopgaps:
   Dependencies:  #10963, #15473,    |
  #15476                             |
-------------------------------------+-------------------------------------

Comment (by darij):

 Here is the bug. First, let us doctest ncsf.py with this branch normally:
 {{{
 darij@travis-virtualbox:~/gitsage6.2$ ./sage -bt
 src/sage/combinat/ncsf_qsym/ncsf.py
 scons: `install' is up to date.
 Updating Cython code....
 Finished Cythonizing, time: 3.75 seconds.
 running install
 running build
 running build_py
 running build_ext
 Executing 0 commands (using 1 thread)
 Time to execute 0 commands: 0.00 seconds.
 Total time spent compiling C/C++ extensions: 0.08 seconds.
 running install_lib
 running install_egg_info
 Removing /home/darij/gitsage6.2/local/lib/python2.7/site-
 packages/sage-6.3.beta2-py2.7.egg-info
 Writing /home/darij/gitsage6.2/local/lib/python2.7/site-
 packages/sage-6.3.beta2-py2.7.egg-info
 Running doctests with ID 2014-05-25-09-34-58-fd673a84.
 Doctesting 1 file.
 sage -t src/sage/combinat/ncsf_qsym/ncsf.py
     [679 tests, 10.12 s]
 ----------------------------------------------------------------------
 All tests passed!
 ----------------------------------------------------------------------
 Total time for all tests: 10.4 seconds
     cpu time: 10.1 seconds
     cumulative wall time: 10.1 seconds
 }}}
 Now, let's do the --long test:
 {{{
 darij@travis-virtualbox:~/gitsage6.2$ ./sage -bt --long
 src/sage/combinat/ncsf_qsym/ncsf.py
 scons: `install' is up to date.
 Updating Cython code....
 Finished Cythonizing, time: 3.88 seconds.
 running install
 running build
 running build_py
 running build_ext
 Executing 0 commands (using 1 thread)
 Time to execute 0 commands: 0.00 seconds.
 Total time spent compiling C/C++ extensions: 0.08 seconds.
 running install_lib
 running install_egg_info
 Removing /home/darij/gitsage6.2/local/lib/python2.7/site-
 packages/sage-6.3.beta2-py2.7.egg-info
 Writing /home/darij/gitsage6.2/local/lib/python2.7/site-
 packages/sage-6.3.beta2-py2.7.egg-info
 Running doctests with ID 2014-05-25-09-35-19-947fb6ad.
 Doctesting 1 file.
 sage -t --long src/sage/combinat/ncsf_qsym/ncsf.py
 **********************************************************************
 File "src/sage/combinat/ncsf_qsym/ncsf.py", line 1520, in
 
sage.combinat.ncsf_qsym.ncsf.NonCommutativeSymmetricFunctions.Bases.ElementMethods.to_symmetric_group_algebra
 Failed example:
     all( S[C].to_symmetric_group_algebra()
          == SGA4(D4(S[C].to_descent_algebra(4)))
          for C in Compositions(4) )
 Exception raised:
     Traceback (most recent call last):
       File "/home/darij/gitsage6.2/local/lib/python2.7/site-
 packages/sage/doctest/forker.py", line 480, in _run
         self.execute(example, compiled, test.globs)
       File "/home/darij/gitsage6.2/local/lib/python2.7/site-
 packages/sage/doctest/forker.py", line 839, in execute
         exec compiled in globs
       File "<doctest
 
sage.combinat.ncsf_qsym.ncsf.NonCommutativeSymmetricFunctions.Bases.ElementMethods.to_symmetric_group_algebra[6]>",
 line 3, in <module>
         for C in Compositions(Integer(4)) )
       File "<doctest
 
sage.combinat.ncsf_qsym.ncsf.NonCommutativeSymmetricFunctions.Bases.ElementMethods.to_symmetric_group_algebra[6]>",
 line 3, in <genexpr>
         for C in Compositions(Integer(4)) )
       File "parent.pyx", line 1083, in
 sage.structure.parent.Parent.__call__ (sage/structure/parent.c:8905)
       File "coerce_maps.pyx", line 95, in
 sage.structure.coerce_maps.DefaultConvertMap_unique._call_
 (sage/structure/coerce_maps.c:4206)
       File "coerce_maps.pyx", line 90, in
 sage.structure.coerce_maps.DefaultConvertMap_unique._call_
 (sage/structure/coerce_maps.c:4113)
       File "/home/darij/gitsage6.2/local/lib/python2.7/site-
 packages/sage/combinat/free_module.py", line 1577, in
 _element_constructor_
         raise TypeError("do not know how to make x (= %s) an element of
 self (=%s)"%(x,self))
     TypeError: do not know how to make x (= D{} + D{1} + D{1, 2} + D{1, 2,
 3} + D{1, 3} + D{2} + D{2, 3} + D{3}) an element of self (=Symmetric group
 algebra of order 4 over Rational Field)
 **********************************************************************
 1 item had failures:
    1 of   8 in
 
sage.combinat.ncsf_qsym.ncsf.NonCommutativeSymmetricFunctions.Bases.ElementMethods.to_symmetric_group_algebra
     [686 tests, 1 failure, 116.10 s]
 ----------------------------------------------------------------------
 sage -t --long src/sage/combinat/ncsf_qsym/ncsf.py  # 1 doctest failed
 ----------------------------------------------------------------------
 Total time for all tests: 116.4 seconds
     cpu time: 116.0 seconds
     cumulative wall time: 116.1 seconds
 }}}
 The failure was in a doctest which is **not** #long time!

 There must be some coercion case poisoning going on, probably similar to
 #15248, possibly connected to #10906. Any comments are welcome, since I
 don't have enough time for Sage these days.

--
Ticket URL: <http://trac.sagemath.org/ticket/15475#comment:12>
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/d/optout.

Reply via email to