summaryrefslogtreecommitdiff
path: root/src/python/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/python/test')
-rwxr-xr-xsrc/python/test/test_simplex_tree.py11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/python/test/test_simplex_tree.py b/src/python/test/test_simplex_tree.py
index d8173b52..eb481a49 100755
--- a/src/python/test/test_simplex_tree.py
+++ b/src/python/test/test_simplex_tree.py
@@ -531,8 +531,6 @@ def test_expansion_with_blocker():
st.insert([5,6],10)
st.insert([6],10)
- # One cannot modify filtration inside blocker - segfault - Let's record accepted simplices
- accepted_simp = []
def blocker(simplex):
try:
# Block all simplices that countains vertex 6
@@ -541,12 +539,10 @@ def test_expansion_with_blocker():
return True
except ValueError:
print(simplex, ' is accepted')
- accepted_simp.append(simplex)
+ st.assign_filtration(simplex, st.filtration(simplex) + 1.)
return False
st.expansion_with_blocker(2, blocker)
- for simplex in accepted_simp:
- st.assign_filtration(simplex, st.filtration(simplex) + 1.)
assert st.num_simplices() == 22
assert st.dimension() == 2
assert st.find([4,5,6]) == False
@@ -555,10 +551,7 @@ def test_expansion_with_blocker():
assert st.filtration([0,2,3]) == 6.
assert st.filtration([1,2,3]) == 6.
- accepted_simp = []
st.expansion_with_blocker(3, blocker)
- for simplex in accepted_simp:
- st.assign_filtration(simplex, st.filtration(simplex) + 1.)
assert st.num_simplices() == 23
assert st.dimension() == 3
assert st.find([4,5,6]) == False
@@ -566,4 +559,4 @@ def test_expansion_with_blocker():
assert st.filtration([0,1,3]) == 5.
assert st.filtration([0,2,3]) == 6.
assert st.filtration([1,2,3]) == 6.
- assert st.filtration([0,1,2,3]) == 6.
+ assert st.filtration([0,1,2,3]) == 7.