Skip to content

Commit a0763cf

Browse files
committed
Mark test as random to avoid failure
1 parent 5188024 commit a0763cf

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

src/sage/rings/number_field/number_field.py

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8780,30 +8780,30 @@ def subfields(self, degree=0, name=None):
87808780
polynomials are supported (:issue:`252`)::
87818781
87828782
sage: K.<a> = NumberField(2*x^4 + 6*x^2 + 1/2)
8783-
sage: sorted(K.subfields(), key=lambda x: x[0].discriminant())
8784-
[(Number Field in a3 with defining polynomial x^2 + 2,
8783+
sage: l = K.subfields(); l # random (see :issue:`39153`)
8784+
[(Number Field in a0 with defining polynomial x,
87858785
Ring morphism:
8786-
From: Number Field in a3 with defining polynomial x^2 + 2
8786+
From: Number Field in a0 with defining polynomial x
87878787
To: Number Field in a with defining polynomial 2*x^4 + 6*x^2 + 1/2
8788-
Defn: a3 |--> 2*a^3 + 5*a,
8788+
Defn: 0 |--> 0,
87898789
None),
8790-
(Number Field in a2 with defining polynomial x^2 + 4,
8790+
(Number Field in a1 with defining polynomial x^2 - 2,
87918791
Ring morphism:
8792-
From: Number Field in a2 with defining polynomial x^2 + 4
8792+
From: Number Field in a1 with defining polynomial x^2 - 2
87938793
To: Number Field in a with defining polynomial 2*x^4 + 6*x^2 + 1/2
8794-
Defn: a2 |--> 2*a^3 + 7*a,
8794+
Defn: a1 |--> a^2 + 3/2,
87958795
None),
8796-
(Number Field in a0 with defining polynomial x,
8796+
(Number Field in a2 with defining polynomial x^2 + 4,
87978797
Ring morphism:
8798-
From: Number Field in a0 with defining polynomial x
8798+
From: Number Field in a2 with defining polynomial x^2 + 4
87998799
To: Number Field in a with defining polynomial 2*x^4 + 6*x^2 + 1/2
8800-
Defn: 0 |--> 0,
8800+
Defn: a2 |--> 2*a^3 + 7*a,
88018801
None),
8802-
(Number Field in a1 with defining polynomial x^2 - 2,
8802+
(Number Field in a3 with defining polynomial x^2 + 2,
88038803
Ring morphism:
8804-
From: Number Field in a1 with defining polynomial x^2 - 2
8804+
From: Number Field in a3 with defining polynomial x^2 + 2
88058805
To: Number Field in a with defining polynomial 2*x^4 + 6*x^2 + 1/2
8806-
Defn: a1 |--> a^2 + 3/2,
8806+
Defn: a3 |--> 2*a^3 + 5*a,
88078807
None),
88088808
(Number Field in a4 with defining polynomial x^4 + 1,
88098809
Ring morphism:
@@ -8814,6 +8814,8 @@ def subfields(self, degree=0, name=None):
88148814
From: Number Field in a with defining polynomial 2*x^4 + 6*x^2 + 1/2
88158815
To: Number Field in a4 with defining polynomial x^4 + 1
88168816
Defn: a |--> -1/2*a4^3 + a4^2 - 1/2*a4)]
8817+
sage: sorted([F.discriminant() for F, _, _ in l])
8818+
[-8, -4, 1, 8, 256]
88178819
"""
88188820
return self._subfields_helper(degree=degree, name=name,
88198821
both_maps=True, optimize=False)

0 commit comments

Comments
 (0)