We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Report disk usage during tests
### Summary

To find tests that consume lots of disk space, make the following change to report the disk usage:

```diff
diff --git a/conftest.py b/conftest.py
index 6f56d52f4..2c399c000 100644
--- a/conftest.py
+++ b/conftest.py
@@ -66,9 +66,18 @@ def pytest_report_teststatus(report, config):
 
         (*rest, result) = outcome.get_result()
         mem = psutil.virtual_memory()
-        used = mem.used / 1024**3
-        total = mem.total / 1024**3
-        outcome.force_result((*rest, f"{result} | mem {used:.1f}/{total:.1f} GB"))
+        mem_used = mem.used / 1024**3
+        mem_total = mem.total / 1024**3
+
+        disk = psutil.disk_usage("/")
+        disk_used = disk.used / 1024**3
+        disk_total = disk.total / 1024**3
+        outcome.force_result(
+            (
+                *rest,
+                f"{result} 🧠 {mem_used:.1f}/{mem_total:.1f} GB 💿 {disk_used:.1f}/{disk_total:.1f} GB",
+            )
+        )
 
 
 @pytest.hookimpl(hookwrapper=True)
```

### Notes

- Make sure to open a PR from a **non-master** branch.
- Sign off the commit using the `-s` flag when making a commit:

  ```sh
  git commit -s -m "..."
           # ^^ make sure to use this
  ```

- Include `#{issue_number}` (e.g. `#123`) in the PR description when opening a PR.
- Make sure to comment here before starting.


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `conftest.py`
Content:
```
1 import json
2 import os
3 import posixpath
4 import shutil
5 import subprocess
6 
7 import click
8 import pytest
9 
10 from mlflow.environment_variables import _MLFLOW_TESTING, MLFLOW_TRACKING_URI
11 
12 
13 def pytest_addoption(parser):
14     parser.addoption(
15         "--requires-ssh",
16         action="store_true",
17         dest="requires_ssh",
18         default=False,
19         help="Run tests decorated with 'requires_ssh' annotation. "
20         "These tests require keys to be configured locally "
21         "for SSH authentication.",
22     )
23     parser.addoption(
24         "--ignore-flavors",
25         action="store_true",
26         dest="ignore_flavors",
27         default=False,
28         help="Ignore tests for model flavors.",
29     )
30 
31 
32 def pytest_configure(config):
33     # Register markers to suppress `PytestUnknownMarkWarning`
34     config.addinivalue_line("markers", "requires_ssh")
35     config.addinivalue_line("markers", "notrackingurimock")
36     config.addinivalue_line("markers", "allow_infer_pip_requirements_fallback")
37 
38 
39 def pytest_sessionstart(session):
40     if uri := MLFLOW_TRACKING_URI.get():
41         click.echo(
42             click.style(
43                 (
44                     f"Environment variable {MLFLOW_TRACKING_URI} is set to {uri!r}, "
45                     "which may interfere with tests."
46                 ),
47                 fg="red",
48             )
49         )
50 
51 
52 def pytest_runtest_setup(item):
53     markers = [mark.name for mark in item.iter_markers()]
54     if "requires_ssh" in markers and not item.config.getoption("--requires-ssh"):
55         pytest.skip("use `--requires-ssh` to run this test")
56 
57 
58 @pytest.hookimpl(hookwrapper=True)
59 def pytest_report_teststatus(report, config):
60     outcome = yield
61     if report.when == "call":
62         try:
63             import psutil
64         except ImportError:
65             return
66 
67         (*rest, result) = outcome.get_result()
68         mem = psutil.virtual_memory()
69         used = mem.used / 1024**3
70         total = mem.total / 1024**3
71         outcome.force_result((*rest, f"{result} | mem {used:.1f}/{total:.1f} GB"))
72 
73 
74 @pytest.hookimpl(hookwrapper=True)
75 def pytest_ignore_collect(path, config):
76     outcome = yield
77     if not outcome.get_result() and config.getoption("ignore_flavors"):
78         # If not ignored by the default hook and `--ignore-flavors` specified
79 
80         # Ignored files and directories must be included in dev/run-python-flavor-tests.sh
81         model_flavors = [
82             # Tests of flavor modules.
83             "tests/azureml",
84             "tests/catboost",
85             "tests/diviner",
86             "tests/fastai",
87             "tests/gluon",
88             "tests/h2o",
89             "tests/johnsnowlabs",
90             "tests/keras",
91             "tests/keras_core",
92             "tests/langchain",
93             "tests/lightgbm",
94             "tests/mleap",
95             "tests/models",
96             "tests/onnx",
97             "tests/openai",
98             "tests/paddle",
99             "tests/pmdarima",
100             "tests/prophet",
101             "tests/pyfunc",
102             "tests/pytorch",
103             "tests/sagemaker",
104             "tests/sentence_transformers",
105             "tests/shap",
106             "tests/sklearn",
107             "tests/spacy",
108             "tests/spark",
109             "tests/statsmodels",
110             "tests/tensorflow",
111             "tests/transformers",
112             "tests/xgboost",
113             # Lazy loading test.
114             "tests/test_mlflow_lazily_imports_ml_packages.py",
115             # Tests of utils.
116             "tests/utils/test_model_utils.py",
117             # This test is included here because it imports many big libraries like tf, keras, etc.
118             "tests/tracking/fluent/test_fluent_autolog.py",
119             # Cross flavor autologging related tests.
120             "tests/autologging/test_autologging_safety_unit.py",
121             "tests/autologging/test_autologging_behaviors_unit.py",
122             "tests/autologging/test_autologging_behaviors_integration.py",
123             "tests/autologging/test_autologging_utils.py",
124             "tests/autologging/test_training_session.py",
125             # Opt in authentication feature.
126             "tests/server/auth",
127             "tests/gateway",
128         ]
129 
130         relpath = os.path.relpath(str(path))
131         relpath = relpath.replace(os.sep, posixpath.sep)  # for Windows
132 
133         if relpath in model_flavors:
134             outcome.force_result(True)
135 
136 
137 def pytest_collection_modifyitems(session, config, items):  # pylint: disable=unused-argument
138     # Executing `tests.server.test_prometheus_exporter` after `tests.server.test_handlers`
139     # results in an error because Flask >= 2.2.0 doesn't allow calling setup method such as
140     # `before_request` on the application after the first request. To avoid this issue,
141     # execute `tests.server.test_prometheus_exporter` first by reordering the test items.
142     items.sort(key=lambda item: item.module.__name__ != "tests.server.test_prometheus_exporter")
143 
144 
145 @pytest.hookimpl(hookwrapper=True)
146 def pytest_terminal_summary(
147     terminalreporter, exitstatus, config
148 ):  # pylint: disable=unused-argument
149     yield
150     failed_test_reports = terminalreporter.stats.get("failed", [])
151     if failed_test_reports:
152         if len(failed_test_reports) <= 30:
153             terminalreporter.section("command to run failed test cases")
154             ids = [repr(report.nodeid) for report in failed_test_reports]
155         else:
156             terminalreporter.section("command to run failed test suites")
157             # Use dict.fromkeys to preserve the order
158             ids = list(dict.fromkeys(report.fspath for report in failed_test_reports))
159         terminalreporter.write(" ".join(["pytest"] + ids))
160         terminalreporter.write("\n" * 2)
161 
162 
163 @pytest.fixture(scope="module", autouse=True)
164 def clean_up_envs():
165     yield
166 
167     if "GITHUB_ACTIONS" in os.environ:
168         from mlflow.utils.virtualenv import _get_mlflow_virtualenv_root
169 
170         shutil.rmtree(_get_mlflow_virtualenv_root(), ignore_errors=True)
171         if os.name != "nt":
172             conda_info = json.loads(subprocess.check_output(["conda", "info", "--json"], text=True))
173             root_prefix = conda_info["root_prefix"]
174             for env in conda_info["envs"]:
175                 if env != root_prefix:
176                     shutil.rmtree(env, ignore_errors=True)
177 
178 
179 @pytest.fixture(scope="session", autouse=True)
180 def enable_mlflow_testing():
181     with pytest.MonkeyPatch.context() as mp:
182         mp.setenv(_MLFLOW_TESTING.name, "TRUE")
183         yield
184
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/conftest.py b/conftest.py
--- a/conftest.py
+++ b/conftest.py
@@ -66,9 +66,22 @@
 
         (*rest, result) = outcome.get_result()
         mem = psutil.virtual_memory()
-        used = mem.used / 1024**3
-        total = mem.total / 1024**3
-        outcome.force_result((*rest, f"{result} | mem {used:.1f}/{total:.1f} GB"))
+        mem_used = mem.used / 1024**3
+        mem_total = mem.total / 1024**3
+
+        disk = psutil.disk_usage("/")
+        disk_used = disk.used / 1024**3
+        disk_total = disk.total / 1024**3
+        outcome.force_result(
+            (
+                *rest,
+                (
+                    f"{result} | "
+                    f"MEM {mem_used:.1f}/{mem_total:.1f} GB | "
+                    f"DISK {disk_used:.1f}/{disk_total:.1f} GB"
+                ),
+            )
+        )
 
 
 @pytest.hookimpl(hookwrapper=True)

{"golden_diff": "diff --git a/conftest.py b/conftest.py\n--- a/conftest.py\n+++ b/conftest.py\n@@ -66,9 +66,22 @@\n \n         (*rest, result) = outcome.get_result()\n         mem = psutil.virtual_memory()\n-        used = mem.used / 1024**3\n-        total = mem.total / 1024**3\n-        outcome.force_result((*rest, f\"{result} | mem {used:.1f}/{total:.1f} GB\"))\n+        mem_used = mem.used / 1024**3\n+        mem_total = mem.total / 1024**3\n+\n+        disk = psutil.disk_usage(\"/\")\n+        disk_used = disk.used / 1024**3\n+        disk_total = disk.total / 1024**3\n+        outcome.force_result(\n+            (\n+                *rest,\n+                (\n+                    f\"{result} | \"\n+                    f\"MEM {mem_used:.1f}/{mem_total:.1f} GB | \"\n+                    f\"DISK {disk_used:.1f}/{disk_total:.1f} GB\"\n+                ),\n+            )\n+        )\n \n \n @pytest.hookimpl(hookwrapper=True)\n", "issue": "Report disk usage during tests\n### Summary\r\n\r\nTo find tests that consume lots of disk space, make the following change to report the disk usage:\r\n\r\n```diff\r\ndiff --git a/conftest.py b/conftest.py\r\nindex 6f56d52f4..2c399c000 100644\r\n--- a/conftest.py\r\n+++ b/conftest.py\r\n@@ -66,9 +66,18 @@ def pytest_report_teststatus(report, config):\r\n \r\n         (*rest, result) = outcome.get_result()\r\n         mem = psutil.virtual_memory()\r\n-        used = mem.used / 1024**3\r\n-        total = mem.total / 1024**3\r\n-        outcome.force_result((*rest, f\"{result} | mem {used:.1f}/{total:.1f} GB\"))\r\n+        mem_used = mem.used / 1024**3\r\n+        mem_total = mem.total / 1024**3\r\n+\r\n+        disk = psutil.disk_usage(\"/\")\r\n+        disk_used = disk.used / 1024**3\r\n+        disk_total = disk.total / 1024**3\r\n+        outcome.force_result(\r\n+            (\r\n+                *rest,\r\n+                f\"{result} \ud83e\udde0 {mem_used:.1f}/{mem_total:.1f} GB \ud83d\udcbf {disk_used:.1f}/{disk_total:.1f} GB\",\r\n+            )\r\n+        )\r\n \r\n \r\n @pytest.hookimpl(hookwrapper=True)\r\n```\r\n\r\n### Notes\r\n\r\n- Make sure to open a PR from a **non-master** branch.\r\n- Sign off the commit using the `-s` flag when making a commit:\r\n\r\n  ```sh\r\n  git commit -s -m \"...\"\r\n           # ^^ make sure to use this\r\n  ```\r\n\r\n- Include `#{issue_number}` (e.g. `#123`) in the PR description when opening a PR.\r\n- Make sure to comment here before starting.\r\n\n", "before_files": [{"content": "import json\nimport os\nimport posixpath\nimport shutil\nimport subprocess\n\nimport click\nimport pytest\n\nfrom mlflow.environment_variables import _MLFLOW_TESTING, MLFLOW_TRACKING_URI\n\n\ndef pytest_addoption(parser):\n    parser.addoption(\n        \"--requires-ssh\",\n        action=\"store_true\",\n        dest=\"requires_ssh\",\n        default=False,\n        help=\"Run tests decorated with 'requires_ssh' annotation. \"\n        \"These tests require keys to be configured locally \"\n        \"for SSH authentication.\",\n    )\n    parser.addoption(\n        \"--ignore-flavors\",\n        action=\"store_true\",\n        dest=\"ignore_flavors\",\n        default=False,\n        help=\"Ignore tests for model flavors.\",\n    )\n\n\ndef pytest_configure(config):\n    # Register markers to suppress `PytestUnknownMarkWarning`\n    config.addinivalue_line(\"markers\", \"requires_ssh\")\n    config.addinivalue_line(\"markers\", \"notrackingurimock\")\n    config.addinivalue_line(\"markers\", \"allow_infer_pip_requirements_fallback\")\n\n\ndef pytest_sessionstart(session):\n    if uri := MLFLOW_TRACKING_URI.get():\n        click.echo(\n            click.style(\n                (\n                    f\"Environment variable {MLFLOW_TRACKING_URI} is set to {uri!r}, \"\n                    \"which may interfere with tests.\"\n                ),\n                fg=\"red\",\n            )\n        )\n\n\ndef pytest_runtest_setup(item):\n    markers = [mark.name for mark in item.iter_markers()]\n    if \"requires_ssh\" in markers and not item.config.getoption(\"--requires-ssh\"):\n        pytest.skip(\"use `--requires-ssh` to run this test\")\n\n\n@pytest.hookimpl(hookwrapper=True)\ndef pytest_report_teststatus(report, config):\n    outcome = yield\n    if report.when == \"call\":\n        try:\n            import psutil\n        except ImportError:\n            return\n\n        (*rest, result) = outcome.get_result()\n        mem = psutil.virtual_memory()\n        used = mem.used / 1024**3\n        total = mem.total / 1024**3\n        outcome.force_result((*rest, f\"{result} | mem {used:.1f}/{total:.1f} GB\"))\n\n\n@pytest.hookimpl(hookwrapper=True)\ndef pytest_ignore_collect(path, config):\n    outcome = yield\n    if not outcome.get_result() and config.getoption(\"ignore_flavors\"):\n        # If not ignored by the default hook and `--ignore-flavors` specified\n\n        # Ignored files and directories must be included in dev/run-python-flavor-tests.sh\n        model_flavors = [\n            # Tests of flavor modules.\n            \"tests/azureml\",\n            \"tests/catboost\",\n            \"tests/diviner\",\n            \"tests/fastai\",\n            \"tests/gluon\",\n            \"tests/h2o\",\n            \"tests/johnsnowlabs\",\n            \"tests/keras\",\n            \"tests/keras_core\",\n            \"tests/langchain\",\n            \"tests/lightgbm\",\n            \"tests/mleap\",\n            \"tests/models\",\n            \"tests/onnx\",\n            \"tests/openai\",\n            \"tests/paddle\",\n            \"tests/pmdarima\",\n            \"tests/prophet\",\n            \"tests/pyfunc\",\n            \"tests/pytorch\",\n            \"tests/sagemaker\",\n            \"tests/sentence_transformers\",\n            \"tests/shap\",\n            \"tests/sklearn\",\n            \"tests/spacy\",\n            \"tests/spark\",\n            \"tests/statsmodels\",\n            \"tests/tensorflow\",\n            \"tests/transformers\",\n            \"tests/xgboost\",\n            # Lazy loading test.\n            \"tests/test_mlflow_lazily_imports_ml_packages.py\",\n            # Tests of utils.\n            \"tests/utils/test_model_utils.py\",\n            # This test is included here because it imports many big libraries like tf, keras, etc.\n            \"tests/tracking/fluent/test_fluent_autolog.py\",\n            # Cross flavor autologging related tests.\n            \"tests/autologging/test_autologging_safety_unit.py\",\n            \"tests/autologging/test_autologging_behaviors_unit.py\",\n            \"tests/autologging/test_autologging_behaviors_integration.py\",\n            \"tests/autologging/test_autologging_utils.py\",\n            \"tests/autologging/test_training_session.py\",\n            # Opt in authentication feature.\n            \"tests/server/auth\",\n            \"tests/gateway\",\n        ]\n\n        relpath = os.path.relpath(str(path))\n        relpath = relpath.replace(os.sep, posixpath.sep)  # for Windows\n\n        if relpath in model_flavors:\n            outcome.force_result(True)\n\n\ndef pytest_collection_modifyitems(session, config, items):  # pylint: disable=unused-argument\n    # Executing `tests.server.test_prometheus_exporter` after `tests.server.test_handlers`\n    # results in an error because Flask >= 2.2.0 doesn't allow calling setup method such as\n    # `before_request` on the application after the first request. To avoid this issue,\n    # execute `tests.server.test_prometheus_exporter` first by reordering the test items.\n    items.sort(key=lambda item: item.module.__name__ != \"tests.server.test_prometheus_exporter\")\n\n\n@pytest.hookimpl(hookwrapper=True)\ndef pytest_terminal_summary(\n    terminalreporter, exitstatus, config\n):  # pylint: disable=unused-argument\n    yield\n    failed_test_reports = terminalreporter.stats.get(\"failed\", [])\n    if failed_test_reports:\n        if len(failed_test_reports) <= 30:\n            terminalreporter.section(\"command to run failed test cases\")\n            ids = [repr(report.nodeid) for report in failed_test_reports]\n        else:\n            terminalreporter.section(\"command to run failed test suites\")\n            # Use dict.fromkeys to preserve the order\n            ids = list(dict.fromkeys(report.fspath for report in failed_test_reports))\n        terminalreporter.write(\" \".join([\"pytest\"] + ids))\n        terminalreporter.write(\"\\n\" * 2)\n\n\n@pytest.fixture(scope=\"module\", autouse=True)\ndef clean_up_envs():\n    yield\n\n    if \"GITHUB_ACTIONS\" in os.environ:\n        from mlflow.utils.virtualenv import _get_mlflow_virtualenv_root\n\n        shutil.rmtree(_get_mlflow_virtualenv_root(), ignore_errors=True)\n        if os.name != \"nt\":\n            conda_info = json.loads(subprocess.check_output([\"conda\", \"info\", \"--json\"], text=True))\n            root_prefix = conda_info[\"root_prefix\"]\n            for env in conda_info[\"envs\"]:\n                if env != root_prefix:\n                    shutil.rmtree(env, ignore_errors=True)\n\n\n@pytest.fixture(scope=\"session\", autouse=True)\ndef enable_mlflow_testing():\n    with pytest.MonkeyPatch.context() as mp:\n        mp.setenv(_MLFLOW_TESTING.name, \"TRUE\")\n        yield\n", "path": "conftest.py"}], "after_files": [{"content": "import json\nimport os\nimport posixpath\nimport shutil\nimport subprocess\n\nimport click\nimport pytest\n\nfrom mlflow.environment_variables import _MLFLOW_TESTING, MLFLOW_TRACKING_URI\n\n\ndef pytest_addoption(parser):\n    parser.addoption(\n        \"--requires-ssh\",\n        action=\"store_true\",\n        dest=\"requires_ssh\",\n        default=False,\n        help=\"Run tests decorated with 'requires_ssh' annotation. \"\n        \"These tests require keys to be configured locally \"\n        \"for SSH authentication.\",\n    )\n    parser.addoption(\n        \"--ignore-flavors\",\n        action=\"store_true\",\n        dest=\"ignore_flavors\",\n        default=False,\n        help=\"Ignore tests for model flavors.\",\n    )\n\n\ndef pytest_configure(config):\n    # Register markers to suppress `PytestUnknownMarkWarning`\n    config.addinivalue_line(\"markers\", \"requires_ssh\")\n    config.addinivalue_line(\"markers\", \"notrackingurimock\")\n    config.addinivalue_line(\"markers\", \"allow_infer_pip_requirements_fallback\")\n\n\ndef pytest_sessionstart(session):\n    if uri := MLFLOW_TRACKING_URI.get():\n        click.echo(\n            click.style(\n                (\n                    f\"Environment variable {MLFLOW_TRACKING_URI} is set to {uri!r}, \"\n                    \"which may interfere with tests.\"\n                ),\n                fg=\"red\",\n            )\n        )\n\n\ndef pytest_runtest_setup(item):\n    markers = [mark.name for mark in item.iter_markers()]\n    if \"requires_ssh\" in markers and not item.config.getoption(\"--requires-ssh\"):\n        pytest.skip(\"use `--requires-ssh` to run this test\")\n\n\n@pytest.hookimpl(hookwrapper=True)\ndef pytest_report_teststatus(report, config):\n    outcome = yield\n    if report.when == \"call\":\n        try:\n            import psutil\n        except ImportError:\n            return\n\n        (*rest, result) = outcome.get_result()\n        mem = psutil.virtual_memory()\n        mem_used = mem.used / 1024**3\n        mem_total = mem.total / 1024**3\n\n        disk = psutil.disk_usage(\"/\")\n        disk_used = disk.used / 1024**3\n        disk_total = disk.total / 1024**3\n        outcome.force_result(\n            (\n                *rest,\n                (\n                    f\"{result} | \"\n                    f\"MEM {mem_used:.1f}/{mem_total:.1f} GB | \"\n                    f\"DISK {disk_used:.1f}/{disk_total:.1f} GB\"\n                ),\n            )\n        )\n\n\n@pytest.hookimpl(hookwrapper=True)\ndef pytest_ignore_collect(path, config):\n    outcome = yield\n    if not outcome.get_result() and config.getoption(\"ignore_flavors\"):\n        # If not ignored by the default hook and `--ignore-flavors` specified\n\n        # Ignored files and directories must be included in dev/run-python-flavor-tests.sh\n        model_flavors = [\n            # Tests of flavor modules.\n            \"tests/azureml\",\n            \"tests/catboost\",\n            \"tests/diviner\",\n            \"tests/fastai\",\n            \"tests/gluon\",\n            \"tests/h2o\",\n            \"tests/johnsnowlabs\",\n            \"tests/keras\",\n            \"tests/keras_core\",\n            \"tests/langchain\",\n            \"tests/lightgbm\",\n            \"tests/mleap\",\n            \"tests/models\",\n            \"tests/onnx\",\n            \"tests/openai\",\n            \"tests/paddle\",\n            \"tests/pmdarima\",\n            \"tests/prophet\",\n            \"tests/pyfunc\",\n            \"tests/pytorch\",\n            \"tests/sagemaker\",\n            \"tests/sentence_transformers\",\n            \"tests/shap\",\n            \"tests/sklearn\",\n            \"tests/spacy\",\n            \"tests/spark\",\n            \"tests/statsmodels\",\n            \"tests/tensorflow\",\n            \"tests/transformers\",\n            \"tests/xgboost\",\n            # Lazy loading test.\n            \"tests/test_mlflow_lazily_imports_ml_packages.py\",\n            # Tests of utils.\n            \"tests/utils/test_model_utils.py\",\n            # This test is included here because it imports many big libraries like tf, keras, etc.\n            \"tests/tracking/fluent/test_fluent_autolog.py\",\n            # Cross flavor autologging related tests.\n            \"tests/autologging/test_autologging_safety_unit.py\",\n            \"tests/autologging/test_autologging_behaviors_unit.py\",\n            \"tests/autologging/test_autologging_behaviors_integration.py\",\n            \"tests/autologging/test_autologging_utils.py\",\n            \"tests/autologging/test_training_session.py\",\n            # Opt in authentication feature.\n            \"tests/server/auth\",\n            \"tests/gateway\",\n        ]\n\n        relpath = os.path.relpath(str(path))\n        relpath = relpath.replace(os.sep, posixpath.sep)  # for Windows\n\n        if relpath in model_flavors:\n            outcome.force_result(True)\n\n\ndef pytest_collection_modifyitems(session, config, items):  # pylint: disable=unused-argument\n    # Executing `tests.server.test_prometheus_exporter` after `tests.server.test_handlers`\n    # results in an error because Flask >= 2.2.0 doesn't allow calling setup method such as\n    # `before_request` on the application after the first request. To avoid this issue,\n    # execute `tests.server.test_prometheus_exporter` first by reordering the test items.\n    items.sort(key=lambda item: item.module.__name__ != \"tests.server.test_prometheus_exporter\")\n\n\n@pytest.hookimpl(hookwrapper=True)\ndef pytest_terminal_summary(\n    terminalreporter, exitstatus, config\n):  # pylint: disable=unused-argument\n    yield\n    failed_test_reports = terminalreporter.stats.get(\"failed\", [])\n    if failed_test_reports:\n        if len(failed_test_reports) <= 30:\n            terminalreporter.section(\"command to run failed test cases\")\n            ids = [repr(report.nodeid) for report in failed_test_reports]\n        else:\n            terminalreporter.section(\"command to run failed test suites\")\n            # Use dict.fromkeys to preserve the order\n            ids = list(dict.fromkeys(report.fspath for report in failed_test_reports))\n        terminalreporter.write(\" \".join([\"pytest\"] + ids))\n        terminalreporter.write(\"\\n\" * 2)\n\n\n@pytest.fixture(scope=\"module\", autouse=True)\ndef clean_up_envs():\n    yield\n\n    if \"GITHUB_ACTIONS\" in os.environ:\n        from mlflow.utils.virtualenv import _get_mlflow_virtualenv_root\n\n        shutil.rmtree(_get_mlflow_virtualenv_root(), ignore_errors=True)\n        if os.name != \"nt\":\n            conda_info = json.loads(subprocess.check_output([\"conda\", \"info\", \"--json\"], text=True))\n            root_prefix = conda_info[\"root_prefix\"]\n            for env in conda_info[\"envs\"]:\n                if env != root_prefix:\n                    shutil.rmtree(env, ignore_errors=True)\n\n\n@pytest.fixture(scope=\"session\", autouse=True)\ndef enable_mlflow_testing():\n    with pytest.MonkeyPatch.context() as mp:\n        mp.setenv(_MLFLOW_TESTING.name, \"TRUE\")\n        yield\n", "path": "conftest.py"}]}