Skip to content

Commit c4a60bd

Browse files
Make test more robust for the function _element_constructor_
1 parent 0d2a944 commit c4a60bd

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/sage/combinat/permutation.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7095,14 +7095,11 @@ def _element_constructor_(self, x, check=True):
70957095
70967096
Ensure that :issue:`37284` is fixed::
70977097
7098-
sage: PG = PermutationGroup(SymmetricGroup(5).gens())
7099-
sage: P5 = Permutations(5)
7098+
sage: PG = PermutationGroup([[(1,2,3),(5,6)],[(7,8)]])
7099+
sage: P5 = Permutations(8)
71007100
sage: p = PG.an_element()
7101-
sage: x = PG([4,3,5,1,2])
7102-
sage: s = P5(x); s
7103-
[4, 3, 5, 1, 2]
7104-
sage: s.parent()
7105-
Standard permutations of 5
7101+
sage: P5(p).parent()
7102+
Standard permutations of 8
71067103
"""
71077104
if isinstance(x, PermutationGroupElement):
71087105
return self. _from_permutation_group_element(x)

0 commit comments

Comments
 (0)