]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
eja: replace a bunch of "manual" tests with a random one.
authorMichael Orlitzky <michael@orlitzky.com>
Thu, 26 Nov 2020 02:23:54 +0000 (21:23 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Thu, 26 Nov 2020 02:23:54 +0000 (21:23 -0500)
mjo/eja/eja_algebra.py

index 9d53bc5fdfd8fca177e43e49a187387fbe5a6085..a51da3e03fc753e33079fde0debdf6ee12a29b3c 100644 (file)
@@ -989,38 +989,13 @@ class FiniteDimensionalEuclideanJordanAlgebra(CombinatorialFreeModule):
         Ensure that computing the rank actually works, since the ranks
         of all simple algebras are known and will be cached by default::
 
-            sage: J = HadamardEJA(4)
-            sage: J.rank.clear_cache()
-            sage: J.rank()
-            4
-
-        ::
-
-            sage: J = JordanSpinEJA(4)
-            sage: J.rank.clear_cache()
-            sage: J.rank()
-            2
-
-        ::
-
-            sage: J = RealSymmetricEJA(3)
-            sage: J.rank.clear_cache()
-            sage: J.rank()
-            3
-
-        ::
-
-            sage: J = ComplexHermitianEJA(2)
-            sage: J.rank.clear_cache()
-            sage: J.rank()
-            2
-
-        ::
+            sage: set_random_seed()    # long time
+            sage: J = random_eja()     # long time
+            sage: caches = J.rank()    # long time
+            sage: J.rank.clear_cache() # long time
+            sage: J.rank() == cached   # long time
+            True
 
-            sage: J = QuaternionHermitianEJA(2)
-            sage: J.rank.clear_cache()
-            sage: J.rank()
-            2
         """
         return len(self._charpoly_coefficients())