Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit 463dea2

Browse files
author
Matthias Koeppe
committed
FormalPolyhedraModule.__init__: Add test
1 parent aecc78a commit 463dea2

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/sage/geometry/polyhedron/modules/formal_polyhedra_module.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,17 @@ def __classcall__(cls, base_ring, dimension, basis, category=None):
9595
def __init__(self, base_ring, dimension, basis, category):
9696
"""
9797
Construct a free module generated by the polyhedra in ``basis``.
98+
99+
TESTS::
100+
101+
sage: from sage.geometry.polyhedron.modules.formal_polyhedra_module import FormalPolyhedraModule
102+
sage: def closed_interval(a,b): return Polyhedron(vertices=[[a], [b]])
103+
sage: I01 = closed_interval(0, 1); I01.rename("conv([0], [1])")
104+
sage: I11 = closed_interval(1, 1); I11.rename("{[1]}")
105+
sage: I12 = closed_interval(1, 2); I12.rename("conv([1], [2])")
106+
sage: I02 = closed_interval(0, 2); I02.rename("conv([0], [2])")
107+
sage: M = FormalPolyhedraModule(QQ, 1, basis=[I01, I11, I12, I02])
108+
sage: TestSuite(M).run()
98109
"""
99110
super(FormalPolyhedraModule, self).__init__(base_ring, basis, prefix="", category=category)
100111

0 commit comments

Comments
 (0)