/ tests / docker / conftest.py
conftest.py
 1  import subprocess
 2  
 3  import pytest
 4  
 5  
 6  @pytest.fixture(scope="package", autouse=True)
 7  def build_mlflow_image():
 8      subprocess.check_call([
 9          "docker",
10          "build",
11          "-t",
12          "mlflow-integration-test",
13          "-f",
14          "docker/Dockerfile.full.dev",
15          ".",
16      ])
17      yield
18      # Clean up the image after all tests complete
19      subprocess.check_call(["docker", "image", "rm", "-f", "mlflow-integration-test"])