Skip to content

Commit

Permalink
sagemathgh-38763: use StructureDescription() in gap/element.pyx tests
Browse files Browse the repository at this point in the history
    
This will fix sagemath#38760

The output of these tests is too verbose, and this unstable. We fix it
here

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [x] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [x] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.
    
URL: sagemath#38763
Reported by: Dima Pasechnik
Reviewer(s): Martin Rubey
  • Loading branch information
Release Manager committed Oct 11, 2024
2 parents 56267ea + 08f203e commit 04a53cc
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions src/sage/libs/gap/element.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2437,31 +2437,22 @@ cdef class GapElement_Function(GapElement):
<Gap function "NormalSubgroups">
sage: b
Sym( [ 1 .. 4 ] )
sage: sorted(a(b))
[Group(()),
Sym( [ 1 .. 4 ] ),
Alt( [ 1 .. 4 ] ),
Group([ (1,4)(2,3), (1,2)(3,4) ])]
sage: [x.StructureDescription() for x in sorted(a(b))]
["1", "S4", "A4", "C2 x C2"]
sage: libgap.eval("a := NormalSubgroups")
<Gap function "NormalSubgroups">
sage: libgap.eval("b := SymmetricGroup(4)")
Sym( [ 1 .. 4 ] )
sage: libgap.collect()
sage: sorted(libgap.eval('a') (libgap.eval('b')))
[Group(()),
Sym( [ 1 .. 4 ] ),
Alt( [ 1 .. 4 ] ),
Group([ (1,4)(2,3), (1,2)(3,4) ])]
sage: [x.StructureDescription() for x in sorted(libgap.eval('a') (libgap.eval('b')))]
["1", "S4", "A4", "C2 x C2"]
sage: a = libgap.eval('a')
sage: b = libgap.eval('b')
sage: libgap.collect()
sage: sorted(a(b))
[Group(()),
Sym( [ 1 .. 4 ] ),
Alt( [ 1 .. 4 ] ),
Group([ (1,4)(2,3), (1,2)(3,4) ])]
sage: [x.StructureDescription() for x in sorted(a(b))]
["1", "S4", "A4", "C2 x C2"]
Not every ``GapElement`` is callable::
Expand Down

0 comments on commit 04a53cc

Please sign in to comment.