diff options
author | Vincent Rouvreau <vincent.rouvreau@inria.fr> | 2022-05-10 10:00:02 +0200 |
---|---|---|
committer | Vincent Rouvreau <vincent.rouvreau@inria.fr> | 2022-05-10 10:00:02 +0200 |
commit | 3952b61604db976f4864b85ebdafa0962766b8bc (patch) | |
tree | 28b1dc4406f79536c795defcd6d145fd543160e7 /src/python/test | |
parent | 7491d4b98d5629d4efd53253188698dae1d845d0 (diff) |
Fix limit tests for plot (and warning in test)
Diffstat (limited to 'src/python/test')
-rw-r--r-- | src/python/test/test_persistence_graphical_tools.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/python/test/test_persistence_graphical_tools.py b/src/python/test/test_persistence_graphical_tools.py index 7d9bae90..994791d7 100644 --- a/src/python/test/test_persistence_graphical_tools.py +++ b/src/python/test/test_persistence_graphical_tools.py @@ -15,7 +15,7 @@ import pytest def test_array_handler(): - diags = np.array([[1, 2], [3, 4], [5, 6]], np.float) + diags = np.array([[1, 2], [3, 4], [5, 6]], float) arr_diags = gd.persistence_graphical_tools._array_handler(diags) for idx in range(len(diags)): assert arr_diags[idx][0] == 0 @@ -98,8 +98,12 @@ def test_limit_to_max_intervals(): def _limit_plot_persistence(function): pplot = function(persistence=[()]) assert issubclass(type(pplot), plt.axes.SubplotBase) + pplot = function(persistence=[()], legend=True) + assert issubclass(type(pplot), plt.axes.SubplotBase) pplot = function(persistence=[(0, float("inf"))]) assert issubclass(type(pplot), plt.axes.SubplotBase) + pplot = function(persistence=[(0, float("inf"))], legend=True) + assert issubclass(type(pplot), plt.axes.SubplotBase) def test_limit_plot_persistence(): |