Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions sklearn/neighbors/tests/test_dist_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ def dist_func(x1, x2, p):
'braycurtis': {}}


@pytest.mark.filterwarnings(
"ignore:'wminkowski' metric is deprecated and will be removed"
)
@pytest.mark.parametrize('metric', METRICS_DEFAULT_PARAMS)
def test_cdist(metric):
argdict = METRICS_DEFAULT_PARAMS[metric]
Expand Down Expand Up @@ -77,6 +80,9 @@ def check_cdist_bool(metric, D_true):
assert_array_almost_equal(D12, D_true)


@pytest.mark.filterwarnings(
"ignore:'wminkowski' metric is deprecated and will be removed"
)
@pytest.mark.parametrize('metric', METRICS_DEFAULT_PARAMS)
def test_pdist(metric):
argdict = METRICS_DEFAULT_PARAMS[metric]
Expand Down
3 changes: 3 additions & 0 deletions sklearn/neighbors/tests/test_neighbors.py
Original file line number Diff line number Diff line change
Expand Up @@ -1220,6 +1220,9 @@ def test_neighbors_badargs():
assert_raises(ValueError, nbrs.radius_neighbors_graph, X, mode='blah')


@pytest.mark.filterwarnings(
"ignore:'wminkowski' metric is deprecated and will be removed"
)
def test_neighbors_metrics(n_samples=20, n_features=3,
n_query_pts=2, n_neighbors=5):
# Test computing the neighbors for various metrics
Expand Down