diff options
author | ROUVREAU Vincent <vincent.rouvreau@inria.fr> | 2021-03-25 08:52:50 +0100 |
---|---|---|
committer | ROUVREAU Vincent <vincent.rouvreau@inria.fr> | 2021-03-25 08:52:50 +0100 |
commit | 953a7da68657b9ab493cfb35b41fc46e26a73876 (patch) | |
tree | 717f6541654148fef445b8417778e05cb4a7ba78 /src/python/test | |
parent | 7e05e915adc1be285e04eb00d3ab7ba1b797f38d (diff) |
Add equality operator for python Simplex tree
Diffstat (limited to 'src/python/test')
-rwxr-xr-x | src/python/test/test_simplex_tree.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/python/test/test_simplex_tree.py b/src/python/test/test_simplex_tree.py index a3eacaa9..92b909ca 100755 --- a/src/python/test/test_simplex_tree.py +++ b/src/python/test/test_simplex_tree.py @@ -404,3 +404,15 @@ def test_boundaries_iterator(): with pytest.raises(RuntimeError): list(st.get_boundaries([6])) # (6) does not exist + +def test_equality_operator(): + st1 = SimplexTree() + st2 = SimplexTree() + + assert st1 == st2 + + st1.insert([1,2,3], 4.) + assert st1 != st2 + + st2.insert([1,2,3], 4.) + assert st1 == st2
\ No newline at end of file |