#7206: doctest failure in groups/perm_gps/permgroup.py
----------------------------+-----------------------------------------------
   Reporter:  ddrake        |       Owner:  joyner  
       Type:  defect        |      Status:  new     
   Priority:  major         |   Milestone:  sage-4.2
  Component:  group_theory  |    Keywords:          
Work_issues:                |      Author:          
   Reviewer:                |      Merged:          
----------------------------+-----------------------------------------------

Comment(by nborie):

 Hy Dan,

 With 4.1.1 and sage-combinat queue applied (the patch come from here :
 #6647), I have
 {{{
 nico...@nicolas-laptop:/opt/sage/devel/sage-combinat$ sage -t
 sage/groups/perm_gps/permgroup.py
 sage -t  "devel/sage-combinat/sage/groups/perm_gps/permgroup.py"
          [5.4 s]

 ----------------------------------------------------------------------
 All tests passed!
 Total time for all tests: 5.4 seconds
 }}}

 But, if I play with the method .random_element()
 {{{
 sage: G = PermutationGroup([[(1,2,3),(4,5)],[(1,2)]])
 sage: G.random_element()
 ()
 sage: G.random_element()
 (4,5)
 sage: G.random_element()
 (1,3,2)(4,5)
 sage: G.random_element()
 (1,3,2)
 sage: G.random_element()
 (2,3)(4,5)
 sage: G = PermutationGroup([[(1,2,3),(4,5)],[(1,2)]])
 sage: G.random_element()
 (4,5)
 sage: G.random_element()
 (1,3,2)
 sage: G.random_element()
 (1,3,2)
 sage: G = PermutationGroup([[(1,2,3),(4,5)],[(1,2)]])
 sage: G.random_element()
 (2,3)(4,5)
 sage: G = PermutationGroup([[(1,2,3),(4,5)],[(1,2)]])
 sage: G.random_element()
 (1,3,2)
 sage: G = PermutationGroup([[(1,2,3),(4,5)],[(1,2)]])
 sage: G.random_element()
 (1,3)
 }}}

 I saw your pointer from my patch about strong generating system. I didn't
 touch random_element(). I would be very happy to help and investigate this
 but my guess is that touch interface and Gap behavior... I don't know even
 if it is possible to put a doctest on such random method where the random
 part is inside Gap and not inside Sage...

 I don't really know that is very important in this doctest, a possible
 trick is
 {{{
 sage: G = PermutationGroup([[(1,2,3),(4,5)],[(1,2)]])
 sage: G.random_element() in G
 True
 }}}
 Here, one's can be sure there no timestamps random dependencies of Gap or
 other things I should not say because I really don't know anything about
 random and Gap.

 If anyone know something about that ?

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7206#comment:2>
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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to