Skip to content

Commit

Permalink
move to conftest
Browse files Browse the repository at this point in the history
  • Loading branch information
v-chen_data committed Nov 19, 2024
1 parent d0f26e8 commit ae6c533
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 6 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,9 @@ def pytest_configure():
def pytest_sessionfinish(session: pytest.Session, exitstatus: int):
if exitstatus == 5:
session.exitstatus = 0 # Ignore no-test-ran errors


@pytest.fixture(autouse=True)
def setup_mlflow_tracking(monkeypatch):
mlflow = pytest.importorskip('mlflow')
monkeypatch.setenv(mlflow.environment_variables.MLFLOW_TRACKING_URI.name, 'databricks')
6 changes: 0 additions & 6 deletions tests/utils/object_store/test_mlflow_object_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@
DEFAULT_PATH = TEST_PATH_FORMAT.format(experiment_id=EXPERIMENT_ID, run_id=RUN_ID)


@pytest.fixture(autouse=True)
def setup_mlflow_tracking(monkeypatch):
mlflow = pytest.importorskip('mlflow')
monkeypatch.setenv(mlflow.environment_variables.MLFLOW_TRACKING_URI.name, 'databricks')


def test_parse_dbfs_path():
full_artifact_path = DEFAULT_PATH + ARTIFACT_PATH
assert MLFlowObjectStore.parse_dbfs_path(full_artifact_path) == (EXPERIMENT_ID, RUN_ID, ARTIFACT_PATH)
Expand Down

0 comments on commit ae6c533

Please sign in to comment.