diff --git a/tests/plugins/test_mlflow_extension.py b/tests/plugins/test_mlflow_extension.py index d98d3ed47..d365809e1 100644 --- a/tests/plugins/test_mlflow_extension.py +++ b/tests/plugins/test_mlflow_extension.py @@ -17,9 +17,12 @@ from pathlib import Path -import mlflow import numpy as np import pytest + +# Skip entire module if mlflow is not available (e.g., Python 3.14+) +mlflow = pytest.importorskip("mlflow") + from sklearn.base import BaseEstimator from sklearn.linear_model import LinearRegression diff --git a/tests/test_base.py b/tests/test_base.py index 663892d4c..109d0507c 100644 --- a/tests/test_base.py +++ b/tests/test_base.py @@ -481,17 +481,19 @@ def test_StrictIndexTypePandasDataFrameResult_build_result(outputs, expected_res ), "series2": pd.Series( [4, 5, 6], - index=pd.PeriodIndex(year=[2022, 2022, 2022], month=[1, 2, 3], freq="M"), + index=pd.PeriodIndex.from_fields( + year=[2022, 2022, 2022], month=[1, 2, 3], freq="M" + ), ), "series3": pd.Series( [4, 5, 6], - index=pd.PeriodIndex( + index=pd.PeriodIndex.from_fields( year=[2022, 2022, 2022], month=[1, 1, 1], day=[3, 4, 5], freq="B" ), ), "series4": pd.Series( [4, 5, 6], - index=pd.PeriodIndex( + index=pd.PeriodIndex.from_fields( year=[2022, 2022, 2022], month=[1, 1, 1], day=[4, 11, 18], freq="W" ), ),