#15223: Let the `TestSuite` test that the construction of a parent returns the
parent
------------------------+----------------------------
  Reporter:  SimonKing  |             Type:  defect
    Status:  new        |         Priority:  major
 Milestone:  sage-5.12  |        Component:  coercion
Resolution:             |  Report Upstream:  N/A
------------------------+----------------------------
 Andrey told me about the following problem. When he implemented toric
 lattices, he inherited a `.construction()` method from general lattices.
 Consequence: If he tried to add elements of two different toric lattices,
 then Sage applied a pushout construction and added the two elements after
 pushing them to `ZZ^2`, which was not what he wanted.

 His solution was, I think, the correct one: He overloaded the
 `.construction()` method, so that it now returns `None`.

 Suggestion: Introduce a test of the `TestSuite` of a parent P, that will
 complain if P.construction() returns a pair `F, O` such that `F(O)!=P`.

 I think this test should be put into `sage.structure.parent.Parent`,
 because this is where `.construction()` is defined in the first place.

--
Ticket URL: <http://trac.sagemath.org/ticket/15223>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to