Skip to content

Commit

Permalink
Trac #22534: Add "long time" to doctests in the geometry component
Browse files Browse the repository at this point in the history
Making tests in the files in the geometry currently takes a long time.

We should add the markup `long time` next to the tests that take too
long.

URL: https://trac.sagemath.org/22534
Reported by: jipilab
Ticket author(s): Jean-Philippe Labbé
Reviewer(s): Travis Scrimshaw
  • Loading branch information
Release Manager authored and vbraun committed Mar 9, 2017
2 parents b2f991d + f41f3a4 commit 7c7d5af
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/sage/geometry/polyhedron/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1107,7 +1107,7 @@ def to_linear_program(self, solver=None, return_variable=False, base_ring=None):
sage: p=polytopes.icosahedron(base_ring=AA)
sage: lp, x = p.to_linear_program(return_variable=True)
sage: lp.set_objective(x[0] + x[1] + x[2])
sage: lp.solve()
sage: lp.solve() # long time
1.309016994374948?
TESTS::
Expand Down
2 changes: 1 addition & 1 deletion src/sage/geometry/polyhedron/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -1375,7 +1375,7 @@ def six_hundred_cell(self, exact=False):
sage: p600 = polytopes.six_hundred_cell()
sage: p600
A 4-dimensional polyhedron in RDF^4 defined as the convex hull of 120 vertices
sage: p600.f_vector()
sage: p600.f_vector() # long time ~2sec
(1, 120, 720, 1200, 600, 1)
Computation with exact coordinates is currently too long to be useful::
Expand Down
8 changes: 4 additions & 4 deletions src/sage/geometry/polyhedron/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def render_3d(projection, *args, **kwds):
sage: p1 = Polyhedron(vertices=[[1,1,1]], rays=[[1,1,1]])
sage: p2 = Polyhedron(vertices=[[2,0,0], [0,2,0], [0,0,2]])
sage: p3 = Polyhedron(vertices=[[1,0,0], [0,1,0], [0,0,1]], rays=[[-1,-1,-1]])
sage: p1.projection().plot() + p2.projection().plot() + p3.projection().plot()
sage: p1.projection().plot() + p2.projection().plot() + p3.projection().plot() # long time ~2sec
Graphics3d Object
It correctly handles various degenerate cases::
Expand All @@ -88,7 +88,7 @@ def render_3d(projection, *args, **kwds):
Graphics3d Object
sage: Polyhedron(vertices=[[1,1,1]], lines=[[0,1,0],[0,0,1]]).plot() # R^2 in R^3
Graphics3d Object
sage: Polyhedron(rays=[[0,1,0],[0,0,1]], lines=[[1,0,0]]).plot() # quadrant wedge in R^2
sage: Polyhedron(rays=[[0,1,0],[0,0,1]], lines=[[1,0,0]]).plot() # long time quadrant wedge in R^2
Graphics3d Object
sage: Polyhedron(rays=[[0,1,0]], lines=[[1,0,0]]).plot() # upper half plane in R^3
Graphics3d Object
Expand Down Expand Up @@ -134,9 +134,9 @@ def render_4d(polyhedron, point_opts={}, line_opts={}, polygon_opts={}, projecti
sage: poly = polytopes.twenty_four_cell()
sage: poly
A 4-dimensional polyhedron in QQ^4 defined as the convex hull of 24 vertices
sage: poly.plot()
sage: poly.plot() # long time
Graphics3d Object
sage: poly.plot(projection_direction=[2,5,11,17])
sage: poly.plot(projection_direction=[2,5,11,17]) # long time ~2sec
Graphics3d Object
sage: type( poly.plot() )
<class 'sage.plot.plot3d.base.Graphics3dGroup'>
Expand Down

0 comments on commit 7c7d5af

Please sign in to comment.