summaryrefslogtreecommitdiff
path: root/src/python/test/test_simplex_tree.py
diff options
context:
space:
mode:
authorVincent Rouvreau <10407034+VincentRouvreau@users.noreply.github.com>2020-12-12 08:02:02 +0100
committerGitHub <noreply@github.com>2020-12-12 08:02:02 +0100
commit1a6f1aa1b3119d5b211eda8fb0908a845c920fa5 (patch)
treeb8bc3c35175871facfb94bfcf589c0a2c53b44b6 /src/python/test/test_simplex_tree.py
parentd712ec89c9940bcc4629f1177755f859cd7e7c59 (diff)
parentba3be8d118a9720677b7776ae9a22c10cfcc0cef (diff)
Merge pull request #436 from VincentRouvreau/ci_without_cgal
Add build and tests wo cgal and eigen and wo cgal
Diffstat (limited to 'src/python/test/test_simplex_tree.py')
-rwxr-xr-xsrc/python/test/test_simplex_tree.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/python/test/test_simplex_tree.py b/src/python/test/test_simplex_tree.py
index 3b23fa0b..a3eacaa9 100755
--- a/src/python/test/test_simplex_tree.py
+++ b/src/python/test/test_simplex_tree.py
@@ -8,7 +8,7 @@
- YYYY/MM Author: Description of the modification
"""
-from gudhi import SimplexTree
+from gudhi import SimplexTree, __GUDHI_USE_EIGEN3
import pytest
__author__ = "Vincent Rouvreau"
@@ -353,11 +353,16 @@ def test_collapse_edges():
assert st.num_simplices() == 10
- st.collapse_edges()
- assert st.num_simplices() == 9
- assert st.find([1, 3]) == False
- for simplex in st.get_skeleton(0):
- assert simplex[1] == 1.
+ if __GUDHI_USE_EIGEN3:
+ st.collapse_edges()
+ assert st.num_simplices() == 9
+ assert st.find([1, 3]) == False
+ for simplex in st.get_skeleton(0):
+ assert simplex[1] == 1.
+ else:
+ # If no Eigen3, collapse_edges throws an exception
+ with pytest.raises(RuntimeError):
+ st.collapse_edges()
def test_reset_filtration():
st = SimplexTree()