e45ce5f127a491192f340818c7c39f98af8d5156,umap/tests/test_umap_validation_params.py,,test_umap_bad_metrics,#,172

Before Change


    u = UMAP(metric="foobar")
    assert_raises(ValueError, u.fit, nn_data)
    u = UMAP(metric=2.75)
    assert_raises(ValueError, u.fit, nn_data)
    u = UMAP(output_metric="foobar")
    assert_raises(ValueError, u.fit, nn_data)
    u = UMAP(output_metric=2.75)
    assert_raises(ValueError, u.fit, nn_data)

After Change



def test_umap_bad_metrics(nn_data):
    u = UMAP(metric="foobar")
    with pytest.raises(ValueError):
        u.fit(nn_data)
    u = UMAP(metric=2.75)
    with pytest.raises(ValueError):
        u.fit(nn_data)
    u = UMAP(output_metric="foobar")
    with pytest.raises(ValueError):
        u.fit(nn_data)
    u = UMAP(output_metric=2.75)
    with pytest.raises(ValueError):
        u.fit(nn_data)
    // u = UMAP(target_metric="foobar")
    // assert_raises(ValueError, u.fit, nn_data)
    // u = UMAP(target_metric=2.75)
    // assert_raises(ValueError, u.fit, nn_data)


def test_umap_bad_n_jobs(nn_data):
    u = UMAP(n_jobs=-2)
    with pytest.raises(ValueError):
        u.fit(nn_data)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 14

Instances


Project Name: lmcinnes/umap
Commit Name: e45ce5f127a491192f340818c7c39f98af8d5156
Time: 2021-02-09
Author: valerio.maggio@gmail.com
File Name: umap/tests/test_umap_validation_params.py
Class Name:
Method Name: test_umap_bad_metrics


Project Name: lmcinnes/umap
Commit Name: e45ce5f127a491192f340818c7c39f98af8d5156
Time: 2021-02-09
Author: valerio.maggio@gmail.com
File Name: umap/tests/test_umap_validation_params.py
Class Name:
Method Name: test_umap_bad_n_components


Project Name: lmcinnes/umap
Commit Name: e45ce5f127a491192f340818c7c39f98af8d5156
Time: 2021-02-09
Author: valerio.maggio@gmail.com
File Name: umap/tests/test_umap_validation_params.py
Class Name:
Method Name: test_umap_bad_output_metric


Project Name: lmcinnes/umap
Commit Name: e45ce5f127a491192f340818c7c39f98af8d5156
Time: 2021-02-09
Author: valerio.maggio@gmail.com
File Name: umap/tests/test_umap_validation_params.py
Class Name:
Method Name: test_umap_bad_metrics