#21027: Add "check" keyword to _module_constructor for additive abelian groups
-------------------------------------+-------------------------------------
       Reporter:  jhpalmieri         |        Owner:
           Type:  defect             |       Status:  needs_work
       Priority:  major              |    Milestone:  sage-7.3
      Component:  group theory       |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  John Palmieri      |    Reviewers:  Travis Scrimshaw
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/jhpalmieri/additive_group_module_constructor|  
be968a6e48387a2a335ed5d780ab7334127c7ef0
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------
Changes (by vbraun):

 * status:  positive_review => needs_work


Comment:

 {{{
 sage -t --long src/sage/groups/additive_abelian/additive_abelian_group.py
 **********************************************************************
 File "src/sage/groups/additive_abelian/additive_abelian_group.py", line
 314, in
 
sage.groups.additive_abelian.additive_abelian_group.AdditiveAbelianGroup_class._module_constructor
 Failed example:
     sage: G = groups.misc.AdditiveAbelian([2,2,2])
 Exception raised:
     Traceback (most recent call last):
       File "/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-
 packages/sage/doctest/forker.py", line 499, in _run
         self.compile_and_execute(example, compiler, test.globs)
       File "/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-
 packages/sage/doctest/forker.py", line 860, in compile_and_execute
         compiled = compiler(example)
       File "/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-
 packages/sage/doctest/forker.py", line 497, in <lambda>
         example.source, filename, "single", compileflags, 1)
       File "<doctest
 
sage.groups.additive_abelian.additive_abelian_group.AdditiveAbelianGroup_class._module_constructor[4]>",
 line 1
         sage: G =
 groups.misc.AdditiveAbelian([Integer(2),Integer(2),Integer(2)])
             ^
     SyntaxError: invalid syntax
 **********************************************************************
 File "src/sage/groups/additive_abelian/additive_abelian_group.py", line
 315, in
 
sage.groups.additive_abelian.additive_abelian_group.AdditiveAbelianGroup_class._module_constructor
 Failed example:
     phi = G.hom([G.0, G.0, G.0])
 Exception raised:
     Traceback (most recent call last):
       File "/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-
 packages/sage/doctest/forker.py", line 499, in _run
         self.compile_and_execute(example, compiler, test.globs)
       File "/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-
 packages/sage/doctest/forker.py", line 862, in compile_and_execute
         exec(compiled, globs)
       File "<doctest
 
sage.groups.additive_abelian.additive_abelian_group.AdditiveAbelianGroup_class._module_constructor[5]>",
 line 1, in <module>
         phi = G.hom([G.gen(0), G.gen(0), G.gen(0)])
       File "/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-
 packages/sage/modules/fg_pid/fgp_module.py", line 1346, in hom
         return self._hom_general(im_gens, check)
       File "/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-
 packages/sage/modules/fg_pid/fgp_module.py", line 1388, in _hom_general
         raise ValueError("Images do not determine a valid homomorphism")
     ValueError: Images do not determine a valid homomorphism
 **********************************************************************
 File "src/sage/groups/additive_abelian/additive_abelian_group.py", line
 316, in
 
sage.groups.additive_abelian.additive_abelian_group.AdditiveAbelianGroup_class._module_constructor
 Failed example:
     phi.image()
 Exception raised:
     Traceback (most recent call last):
       File "/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-
 packages/sage/doctest/forker.py", line 499, in _run
         self.compile_and_execute(example, compiler, test.globs)
       File "/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-
 packages/sage/doctest/forker.py", line 862, in compile_and_execute
         exec(compiled, globs)
       File "<doctest
 
sage.groups.additive_abelian.additive_abelian_group.AdditiveAbelianGroup_class._module_constructor[6]>",
 line 1, in <module>
         phi.image()
     NameError: name 'phi' is not defined
 **********************************************************************
 1 item had failures:
    3 of   8 in
 
sage.groups.additive_abelian.additive_abelian_group.AdditiveAbelianGroup_class._module_constructor
 }}}

--
Ticket URL: <https://trac.sagemath.org/ticket/21027#comment:4>
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 https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to