]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
eja: randomize and fix a bug in the subalgebra_idempotent() test.
authorMichael Orlitzky <michael@orlitzky.com>
Fri, 26 Jul 2019 00:41:12 +0000 (20:41 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Mon, 29 Jul 2019 03:19:01 +0000 (23:19 -0400)
mjo/eja/euclidean_jordan_algebra.py

index a469bb0d7ba1302ccf30289c9b1c0c5518ed527f..920ecc988d21c8ce698fdd4dcf0aefceffdb8236 100644 (file)
@@ -1211,12 +1211,11 @@ class FiniteDimensionalEuclideanJordanAlgebra(FiniteDimensionalAlgebra):
             TESTS::
 
                 sage: set_random_seed()
-                sage: J = RealCartesianProductEJA(5)
-                sage: c = J.random_element().subalgebra_idempotent()
-                sage: c^2 == c
-                True
-                sage: J = JordanSpinEJA(5)
-                sage: c = J.random_element().subalgebra_idempotent()
+                sage: J = random_eja()
+                sage: x = J.random_element()
+                sage: while x.is_nilpotent():
+                ....:     x = J.random_element()
+                sage: c = x.subalgebra_idempotent()
                 sage: c^2 == c
                 True