/ tests / utils / test_data.py
test_data.py
 1  import os
 2  
 3  from mlflow.projects import _project_spec
 4  from mlflow.utils.data_utils import is_uri
 5  
 6  TEST_DIR = "tests"
 7  TEST_PROJECT_DIR = os.path.join(TEST_DIR, "resources", "example_project")
 8  
 9  
10  def load_project():
11      return _project_spec.load_project(directory=TEST_PROJECT_DIR)
12  
13  
14  def test_is_uri():
15      assert is_uri("s3://some/s3/path")
16      assert is_uri("gs://some/gs/path")
17      assert is_uri("dbfs:/some/dbfs/path")
18      assert is_uri("file://some/local/path")
19      assert not is_uri("/tmp/some/local/path")