From: Pieter Lenaerts <plenae@disroot.org>
Date: Wed, 24 Jun 2026 21:32:27 +0200
Subject: Skip broken tests

Forwarded: not-needed
---
 tests/client/test_config.py              |  2 ++
 tests/server/fastmcp/test_integration.py | 33 +++++++++++++++++----------
 tests/test_examples.py                   | 39 ++++++++++++++++++++------------
 3 files changed, 47 insertions(+), 27 deletions(-)

diff --git a/tests/client/test_config.py b/tests/client/test_config.py
index d1a0576..0595eb8 100644
--- a/tests/client/test_config.py
+++ b/tests/client/test_config.py
@@ -23,6 +23,7 @@ def mock_config_path(temp_config_dir: Path):
         yield temp_config_dir
 
 
+@pytest.mark.skip(reason="No UV in debian.")
 def test_command_execution(mock_config_path: Path):
     """Test that the generated command can actually be executed."""
     # Setup
@@ -50,6 +51,7 @@ def test_command_execution(mock_config_path: Path):
     assert "usage" in result.stdout.lower()
 
 
+@pytest.mark.skip(reason="No UV in debian.")
 def test_absolute_uv_path(mock_config_path: Path):
     """Test that the absolute path to uv is used when available."""
     # Mock the shutil.which function to return a fake path
diff --git a/tests/server/fastmcp/test_integration.py b/tests/server/fastmcp/test_integration.py
index 70948bd..f337fa1 100644
--- a/tests/server/fastmcp/test_integration.py
+++ b/tests/server/fastmcp/test_integration.py
@@ -10,6 +10,10 @@ single-feature servers across different transports (SSE and StreamableHTTP).
 # pyright: reportUnknownVariableType=false
 # pyright: reportUnknownArgumentType=false
 
+import pytest
+pytestmark = pytest.mark.skip("These tests require the examples directory "
+                              "to be available")
+
 import json
 import multiprocessing
 import socket
@@ -20,18 +24,23 @@ import uvicorn
 from anyio.streams.memory import MemoryObjectReceiveStream, MemoryObjectSendStream
 from pydantic import AnyUrl
 
-from examples.snippets.servers import (
-    basic_prompt,
-    basic_resource,
-    basic_tool,
-    completion,
-    elicitation,
-    fastmcp_quickstart,
-    notifications,
-    sampling,
-    structured_output,
-    tool_progress,
-)
+try:
+    from examples.snippets.servers import (
+        basic_prompt,
+        basic_resource,
+        basic_tool,
+        completion,
+        elicitation,
+        fastmcp_quickstart,
+        notifications,
+        sampling,
+        structured_output,
+        tool_progress,
+    )
+except ImportError:
+    # This can't work without the examples dir available as a package.
+    pass
+
 from mcp.client.session import ClientSession
 from mcp.client.sse import sse_client
 from mcp.client.streamable_http import GetSessionIdCallback, streamable_http_client
diff --git a/tests/test_examples.py b/tests/test_examples.py
index 51a5c52..b17dfbd 100644
--- a/tests/test_examples.py
+++ b/tests/test_examples.py
@@ -5,10 +5,17 @@
 # pyright: reportUnknownArgumentType=false
 # pyright: reportUnknownMemberType=false
 
+import pytest
+pytestmark = pytest.mark.skip("These tests require the examples directory "
+                              "to be available")
+
 import sys
 
-import pytest
-from pytest_examples import CodeExample, EvalExample, find_examples
+try:
+    from pytest_examples import CodeExample, EvalExample, find_examples
+except ImportError:
+    # This can't work without the examples folder importable as a package.
+    pass
 
 from mcp.shared.memory import create_connected_server_and_client_session as client_session
 from mcp.types import TextContent, TextResourceContents
@@ -99,16 +106,18 @@ async def test_desktop(monkeypatch: pytest.MonkeyPatch):
             assert "/fake/path/file1.txt" in content.text
             assert "/fake/path/file2.txt" in content.text
 
-
-@pytest.mark.parametrize("example", list(find_examples("README.md")), ids=str)
-def test_docs_examples(example: CodeExample, eval_example: EvalExample):
-    ruff_ignore: list[str] = ["F841", "I001", "F821"]  # F821: undefined names (snippets lack imports)
-
-    # Use project's actual line length of 120
-    eval_example.set_config(ruff_ignore=ruff_ignore, target_version="py310", line_length=120)
-
-    # Use Ruff for both formatting and linting (skip Black)
-    if eval_example.update_examples:  # pragma: no cover
-        eval_example.format_ruff(example)
-    else:
-        eval_example.lint_ruff(example)
+# This can't work without find_examples, which is from the examples directory,
+# wich isn't importable as a package.
+
+# @pytest.mark.parametrize("example", list(find_examples("README.md")), ids=str)
+# def test_docs_examples(example: CodeExample, eval_example: EvalExample):
+#     ruff_ignore: list[str] = ["F841", "I001", "F821"]  # F821: undefined names (snippets lack imports)
+# 
+#     # Use project's actual line length of 120
+#     eval_example.set_config(ruff_ignore=ruff_ignore, target_version="py310", line_length=120)
+# 
+#     # Use Ruff for both formatting and linting (skip Black)
+#     if eval_example.update_examples:  # pragma: no cover
+#         eval_example.format_ruff(example)
+#     else:
+#         eval_example.lint_ruff(example)
