From 112c30fb21fa0ae207ba973bd74e1aee5a9f1692 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Philippe=20Labb=C3=A9?= Date: Wed, 24 Jul 2019 17:37:20 +0200 Subject: [PATCH] fixed tests --- src/sage/geometry/polyhedron/base.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/sage/geometry/polyhedron/base.py b/src/sage/geometry/polyhedron/base.py index 793663861d0..2f87275a486 100644 --- a/src/sage/geometry/polyhedron/base.py +++ b/src/sage/geometry/polyhedron/base.py @@ -2281,7 +2281,7 @@ def boundary_complex(self): sage: c.boundary_complex() Traceback (most recent call last): ... - NotImplementedError: this function is implemented for simplicial polytopes only + NotImplementedError: this function is only implemented for simplicial polytopes TESTS:: @@ -2292,15 +2292,15 @@ def boundary_complex(self): ValueError: self should be compact """ from sage.homology.simplicial_complex import SimplicialComplex - try: - if self.is_simplicial(): - facets = [f.ambient_V_indices() for f in self.facets()] - return SimplicialComplex(facets,maximality_check=False) - else: - raise NotImplementedError("this function is implemented for simplicial polytopes only") - except ValueError: + if not self.is_compact(): raise ValueError("self should be compact") + if self.is_simplicial(): + facets = [f.ambient_V_indices() for f in self.facets()] + return SimplicialComplex(facets,maximality_check=False) + else: + raise NotImplementedError("this function is only implemented for simplicial polytopes") + @cached_method def facet_adjacency_matrix(self): """