Skip to content

pytest plugin breaks scikit-learn's parametrize_with_checks decorator #903

@randolf-scholz

Description

@randolf-scholz

scikit-learn implements a decorator that autogenerates pytest.mark.parametrize: https://scikit-learn.org/stable/modules/generated/sklearn.utils.estimator_checks.parametrize_with_checks.html

from sklearn.linear_model import LogisticRegression
from sklearn.tree import DecisionTreeRegressor
from sklearn.utils.estimator_checks import parametrize_with_checks

@parametrize_with_checks([LogisticRegression(), DecisionTreeRegressor()])
def test_sklearn_compatible_estimator(estimator, check):
    check(estimator)

when running pytest with the tach plugin enabled, this breaks with an obscure error message

Failed: In test_sklearn_compatible_estimator: 1 parameter sets specified, with different number of ids: 135

if the tach plugin is disabled, then the tests run normally

Metadata

Metadata

Assignees

No one assigned

    Labels

    awaiting responsewaiting for more info from the author - will eventually close if they don't respondtach test

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions