]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
eja: add randomness to a test.
authorMichael Orlitzky <michael@orlitzky.com>
Thu, 11 Mar 2021 19:36:30 +0000 (14:36 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Thu, 11 Mar 2021 19:36:30 +0000 (14:36 -0500)
mjo/eja/eja_element.py

index 16e15e5d081447d9b5c046e88a02edfdf678f21c..fbfd127ee496c46a9b8d06e3a1ca53129b8ce151 100644 (file)
@@ -156,10 +156,10 @@ class FiniteDimensionalEJAElement(IndexedFreeModuleElement):
         to zero on that element::
 
             sage: set_random_seed()
-            sage: x = HadamardEJA(3).random_element()
+            sage: x = random_eja().random_element()
             sage: p = x.characteristic_polynomial()
-            sage: x.apply_univariate_polynomial(p)
-            0
+            sage: x.apply_univariate_polynomial(p).is_zero()
+            True
 
         The characteristic polynomials of the zero and unit elements
         should be what we think they are in a subalgebra, too::