/ tests / test_skinny_client_autolog_without_scipy.py
test_skinny_client_autolog_without_scipy.py
 1  import os
 2  
 3  import pytest
 4  
 5  
 6  @pytest.mark.skipif(
 7      "MLFLOW_SKINNY" not in os.environ, reason="This test is only valid for the skinny client"
 8  )
 9  def test_autolog_without_scipy():
10      import mlflow
11  
12      with pytest.raises(ImportError, match="scipy"):
13          import scipy  # noqa: F401
14  
15      assert not mlflow.models.utils.HAS_SCIPY
16  
17      mlflow.autolog()
18      mlflow.models.utils._Example({})