Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

fix: more hatch -> failures (#8655)

Dylan Madisetti0b5467c2d82e
diff --git a/tests/_runtime/packages/test_package_managers.py b/tests/_runtime/packages/test_package_managers.py
index aa13ca8d50..93c3982388 100644
--- a/tests/_runtime/packages/test_package_managers.py
+++ b/tests/_runtime/packages/test_package_managers.py
@@ -333,6 +333,14 @@ async def test_uv_pip_install() -> None:
runs_calls: list[list[str]] = []
with (
+ patch(
+ "marimo._runtime.packages.pypi_package_manager.UvPackageManager.is_in_uv_project",
+ new=property(lambda _: False),
+ ),
+ patch(
+ "marimo._runtime.packages.pypi_package_manager.UvPackageManager._uv_bin",
+ new=property(lambda _: "uv"),
+ ),
patch("marimo._utils.subprocess.subprocess.Popen") as mock_popen,
patch("sys.stdout.buffer.write"),
):
diff --git a/tests/_runtime/test_manage_script_metadata.py b/tests/_runtime/test_manage_script_metadata.py
index d8a1332089..d20d4b0781 100644
--- a/tests/_runtime/test_manage_script_metadata.py
+++ b/tests/_runtime/test_manage_script_metadata.py
@@ -36,6 +36,10 @@ HAS_UV = DependencyManager.which("uv")
@pytest.mark.skipif(not HAS_UV, reason="uv not installed")
+@patch(
+ "marimo._runtime.packages.pypi_package_manager.UvPackageManager.is_in_uv_project",
+ new=property(lambda _: False),
+)
async def test_manage_script_metadata_uv(
tmp_path: pathlib.Path, mocked_kernel: MockedKernel
) -> None:
@@ -85,6 +89,10 @@ async def test_manage_script_metadata_uv(
@pytest.mark.skipif(not HAS_UV, reason="uv not installed")
+@patch(
+ "marimo._runtime.packages.pypi_package_manager.UvPackageManager.is_in_uv_project",
+ new=property(lambda _: False),
+)
async def test_manage_script_metadata_uv_deletion(
tmp_path: pathlib.Path, mocked_kernel: MockedKernel
) -> None: