Skip to content

Commit

Permalink
added a test for gens_orders() method
Browse files Browse the repository at this point in the history
  • Loading branch information
amanmoon committed Jan 1, 2024
1 parent 28427c4 commit ee16f2c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/sage/groups/abelian_gps/abelian_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -978,8 +978,12 @@ def gens_orders(self):
sage: Z2xZ3 is Z6
False
TESTS::
TESTS::
sage: G, (g0, g1) = AbelianGroup(2, [48, 0]).objgens()
sage: G0 = G.subgroup([g0])
sage: len(G0.gens()) == len(G0.gens_orders())
True
sage: F = AbelianGroup(3, [2], names='abc')
sage: list(map(type, F.gens_orders()))
[<class 'sage.rings.integer.Integer'>,
Expand Down Expand Up @@ -1629,7 +1633,7 @@ def __init__(self, ambient, gens, names="f", category=None):
Multiplicative Abelian subgroup isomorphic to Z x Z generated by {a^3, b}
sage: F.subgroup([c])
Multiplicative Abelian subgroup isomorphic to C2 x C3 x C5 generated by {c}
sage: F.subgroup([a, c])
sage: S = F.subgroup([a, c]); S
Multiplicative Abelian subgroup isomorphic to C2 x C3 x C5 x Z generated by {a, c}
sage: F.subgroup([a, b*c])
Multiplicative Abelian subgroup isomorphic to Z x Z generated by {a, b*c}
Expand Down

0 comments on commit ee16f2c

Please sign in to comment.