Skip to content

Commit 2c96a88

Browse files
committed
Starting to test plotting
1 parent 0db494d commit 2c96a88

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

hdbscan/tests/test_hdbscan.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
from sklearn.utils.testing import assert_in
1414
from sklearn.utils.testing import assert_not_in
1515
from sklearn.utils.testing import assert_no_warnings
16+
from sklearn.utils.testing import if_matplotlib
1617
from hdbscan import HDBSCAN
1718
from hdbscan import hdbscan
1819
from sklearn.cluster.tests.common import generate_clustered_data
@@ -142,12 +143,10 @@ def test_hdbscan_boruvka_balltree_matches():
142143

143144
assert_less(num_mismatches / float(data.shape[0]), 0.01)
144145

145-
def test_condensed_tree():
146-
146+
def test_condensed_tree_plot():
147147
clusterer = HDBSCAN().fit(X)
148-
ax = clusterer.condensed_tree_.plot()
148+
if_matplotlib(clusterer.condensed_tree_.plot)()
149149

150-
assert(ax is not None)
151150

152151
def test_hdbscan_badargs():
153152
assert_raises(ValueError,

0 commit comments

Comments
 (0)