Closed saraedum closed 10 years ago
Branch: u/saraedum/ticket/15897
New commits:
dba5677 | Use a UniqueFactory to cache instances of QuaternionAlgebra |
Author: Julian Rueth
Looks good to me.
Reviewer: David Roe
sage -t src/sage/algebras/quaternion_algebra.py
**********************************************************************
File "src/sage/algebras/quaternion_algebra.py", line 12, in sage.algebras.quaternion_algebra.unpickle_QuaternionAlgebra_v0
Failed example:
f, t = Q.__reduce__()
Exception raised:
Traceback (most recent call last):
File "/home/release/Sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 480, in _run
self.execute(example, compiled, test.globs)
File "/home/release/Sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 839, in execute
exec compiled in globs
File "<doctest sage.algebras.quaternion_algebra.unpickle_QuaternionAlgebra_v0[1]>", line 1, in <module>
f, t = Q.__reduce__()
ValueError: too many values to unpack
**********************************************************************
File "src/sage/algebras/quaternion_algebra.py", line 14, in sage.algebras.quaternion_algebra.unpickle_QuaternionAlgebra_v0
Failed example:
sage.algebras.quaternion_algebra.unpickle_QuaternionAlgebra_v0(*t)
Exception raised:
Traceback (most recent call last):
File "/home/release/Sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 480, in _run
self.execute(example, compiled, test.globs)
File "/home/release/Sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 839, in execute
exec compiled in globs
File "<doctest sage.algebras.quaternion_algebra.unpickle_QuaternionAlgebra_v0[3]>", line 1, in <module>
sage.algebras.quaternion_algebra.unpickle_QuaternionAlgebra_v0(*t)
NameError: name 't' is not defined
**********************************************************************
1 item had failures:
2 of 5 in sage.algebras.quaternion_algebra.unpickle_QuaternionAlgebra_v0
[4 tests, 2 failures, 0.01 s]
----------------------------------------------------------------------
sage -t src/sage/algebras/quaternion_algebra.py # 2 doctests failed
----------------------------------------------------------------------
Branch pushed to git repo; I updated commit sha1. New commits:
bdaaaff | Fixed a pickling doctest for QuaternionAlgebras |
Changed reviewer from David Roe to David Roe, Peter Bruin
Looks good and the patchbot is happy. (But quaternion algebras are not commutative!)
Changed branch from u/saraedum/ticket/15897 to bdaaaff
Quaternion algebras use a generic dictionary to cache objects (instead of
UniqueRepresentation
orUniqueFactory
). This ticket replaces this generic cache with aUniqueFactory
implementation.Component: algebra
Author: Julian Rueth
Branch/Commit:
bdaaaff
Reviewer: David Roe, Peter Bruin
Issue created by migration from https://trac.sagemath.org/ticket/15897