Skip to content

Commit 49768fd

Browse files
committed
Tests(chore): Run the mcp adapter suite in the gate
why: fastmcp is only the optional `mcp` extra, so a plain `uv sync` prunes it -- which silently turns `uv run mypy` red and makes every fastmcp adapter test importorskip away. The committed adapter's green gate depended on fastmcp happening to be installed. what: - Add fastmcp + tomlkit to the dev and testing dependency-groups so the standard gate type-checks and runs the adapter + mcp_swap tests (fastmcp also stays the `mcp` extra for end users) - Add --ignore=docs/_build to pytest addopts: `docs` is a testpath, so a stale built-HTML tree poisons collection (the gate's rm docs/_build first-step was the only guard) - Reformat ops/plan.py (pre-existing blank-line drift surfaced by ruff) - uv.lock: add tomlkit (no other version churn)
1 parent 773570d commit 49768fd

3 files changed

Lines changed: 32 additions & 1 deletion

File tree

pyproject.toml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ dev = [
6565
"pytest-mock",
6666
"pytest-watcher",
6767
"pytest-xdist",
68+
# MCP adapter — the optional `mcp` extra, included here so the gate
69+
# type-checks (mypy) and exercises the fastmcp adapter + its tests
70+
# instead of silently skipping them.
71+
"fastmcp",
72+
# Scripts (scripts/mcp_swap.py dev tool)
73+
"tomlkit",
6874
# Coverage
6975
"codecov",
7076
"coverage",
@@ -88,6 +94,10 @@ testing = [
8894
"pytest-rerunfailures",
8995
"pytest-mock",
9096
"pytest-watcher",
97+
# MCP adapter (optional `mcp` extra) so the adapter tests run here too
98+
"fastmcp",
99+
# Scripts (scripts/mcp_swap.py dev tool)
100+
"tomlkit",
91101
]
92102
coverage =[
93103
"codecov",
@@ -315,7 +325,10 @@ addopts = [
315325
"--showlocals",
316326
"--doctest-docutils-modules",
317327
"-p no:doctest",
318-
"--reruns=2"
328+
"--reruns=2",
329+
# Built HTML lives under docs/_build and `docs` is a testpath; never
330+
# collect generated artifacts (their relative directives fail to parse).
331+
"--ignore=docs/_build",
319332
]
320333
doctest_optionflags = [
321334
"ELLIPSIS",

src/libtmux/experimental/ops/plan.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ def preview(self, *, version: str | None = None) -> list[tuple[str, ...] | None]
238238
>>> plan.preview()
239239
[('split-window', '-t', '@1', '-v', '-P', '-F', '#{pane_id}'), None]
240240
"""
241+
241242
def _render(op: Operation[t.Any]) -> tuple[str, ...] | None:
242243
try:
243244
return op.render(version=version)

uv.lock

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)