diff --git a/sklearn/cluster/tests/test_optics.py b/sklearn/cluster/tests/test_optics.py index 1215746faa4c3..aaf5e8daf2919 100755 --- a/sklearn/cluster/tests/test_optics.py +++ b/sklearn/cluster/tests/test_optics.py @@ -449,3 +449,10 @@ def test_precomputed_dists(): assert_allclose(clust1.reachability_, clust2.reachability_) assert_array_equal(clust1.labels_, clust2.labels_) + +def test_processing_order(): + Y = [[0],[10],[-10],[25]] + clust = OPTICS(min_samples=3, max_eps=15).fit(Y) + assert_array_equal(clust.reachability_, [np.inf, 10, 10, 15]) + assert_array_equal(clust.core_distances_, [10, 15, 20, 25]) + assert_array_equal(clust.ordering_, [0, 1, 2, 3])