c3eb5eda0fe08d3c0341031a23211b89721ae3a8,sklearn/neighbors/tests/test_lof.py,,test_novelty_errors,#,155

Before Change


    // predict, decision_function and score_samples raise ValueError
    for method in ["predict", "decision_function", "score_samples"]:
        msg = ("{} is not available when novelty=False".format(method))
        assert_raises_regex(AttributeError, msg, getattr, clf, method)

    // check errors for novelty=True
    clf = neighbors.LocalOutlierFactor(novelty=True)
    msg = "fit_predict is not available when novelty=True"

After Change


    // predict, decision_function and score_samples raise ValueError
    for method in ["predict", "decision_function", "score_samples"]:
        msg = ("{} is not available when novelty=False".format(method))
        with pytest.raises(AttributeError, match=msg):
            getattr(clf, method)

    // check errors for novelty=True
    clf = neighbors.LocalOutlierFactor(novelty=True)
    msg = "fit_predict is not available when novelty=True"
    with pytest.raises(AttributeError, match=msg):
        getattr(clf, "fit_predict")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: scikit-learn/scikit-learn
Commit Name: c3eb5eda0fe08d3c0341031a23211b89721ae3a8
Time: 2021-02-22
Author: h.almubarak@ieee.org
File Name: sklearn/neighbors/tests/test_lof.py
Class Name:
Method Name: test_novelty_errors


Project Name: scikit-learn/scikit-learn
Commit Name: dac560551c5767d9a8608f86e3f253e706026189
Time: 2021-02-12
Author: yasmeen.youssef.alsaedi@gmail.com
File Name: sklearn/linear_model/tests/test_perceptron.py
Class Name:
Method Name: test_undefined_methods


Project Name: scikit-learn/scikit-learn
Commit Name: dac560551c5767d9a8608f86e3f253e706026189
Time: 2021-02-12
Author: yasmeen.youssef.alsaedi@gmail.com
File Name: sklearn/linear_model/tests/test_passive_aggressive.py
Class Name:
Method Name: test_classifier_undefined_methods


Project Name: scikit-learn/scikit-learn
Commit Name: dac560551c5767d9a8608f86e3f253e706026189
Time: 2021-02-12
Author: yasmeen.youssef.alsaedi@gmail.com
File Name: sklearn/linear_model/tests/test_passive_aggressive.py
Class Name:
Method Name: test_regressor_undefined_methods