diff options
author | Vincent Rouvreau <10407034+VincentRouvreau@users.noreply.github.com> | 2020-01-16 12:32:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-16 12:32:56 +0100 |
commit | 32a5b2ed4f69cc085dfef66bd44d00fd375d1cc9 (patch) | |
tree | c96f825a731b82f7240b2ffc81a57a8dd2bffa92 /src/python/test/test_alpha_complex.py | |
parent | 8c20dd2dc4b3b192badb6d26c27efdaaa32cd9bd (diff) | |
parent | d747facccbe835be1384e569cf3d6e4c335c0364 (diff) |
Merge pull request #202 from VincentRouvreau/cython_language_level_not_set
Cython language level not set
Diffstat (limited to 'src/python/test/test_alpha_complex.py')
-rwxr-xr-x | src/python/test/test_alpha_complex.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/python/test/test_alpha_complex.py b/src/python/test/test_alpha_complex.py index 712a50b6..0d9e9e45 100755 --- a/src/python/test/test_alpha_complex.py +++ b/src/python/test/test_alpha_complex.py @@ -11,8 +11,13 @@ from gudhi import AlphaComplex, SimplexTree import math import numpy as np -import itertools import pytest +try: + # python3 + from itertools import zip_longest +except ImportError: + # python2 + from itertools import izip_longest as zip_longest __author__ = "Vincent Rouvreau" __copyright__ = "Copyright (C) 2016 Inria" @@ -114,6 +119,6 @@ def test_safe_alpha_persistence_comparison(): diag1 = simplex_tree1.persistence() diag2 = simplex_tree2.persistence() - for (first_p, second_p) in itertools.zip_longest(diag1, diag2): + for (first_p, second_p) in zip_longest(diag1, diag2): assert first_p[0] == pytest.approx(second_p[0]) assert first_p[1] == pytest.approx(second_p[1]) |