Skip to content

Commit f23cdc7

Browse files
Trecekclaude
andcommitted
fix(review): replace importorskip on stdlib pathlib with direct import
pathlib is stdlib since Python 3.4 — importorskip is a no-op guard. Also add gate.enable.assert_not_called() to verify gate stays disabled. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent ae96971 commit f23cdc7

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

tests/server/test_capability_admission_e2e.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
from __future__ import annotations
88

9+
from pathlib import Path
10+
911
import pytest
1012

1113
from autoskillit.core import BACKEND_CAPABILITY_INGREDIENTS, CAPABILITY_GATE_CALLABLES
@@ -14,7 +16,7 @@
1416
pytestmark = [pytest.mark.layer("server"), pytest.mark.medium]
1517

1618

17-
_PROJECT_ROOT = pytest.importorskip("pathlib").Path(__file__).resolve().parent.parent.parent
19+
_PROJECT_ROOT = Path(__file__).resolve().parent.parent.parent
1820

1921

2022
def test_capability_ingredient_keys_match_registry() -> None:
@@ -120,4 +122,5 @@ async def test_open_kitchen_refuses_doa_codex_pipeline() -> None:
120122
assert parsed["kitchen"] == "dispatch_infeasible"
121123
assert "gate_backend_write" in parsed["infeasible_steps"]
122124
tool_ctx.gate.disable.assert_called_once()
125+
tool_ctx.gate.enable.assert_not_called()
123126
fastmcp_ctx.disable_components.assert_called_once_with(tags={"kitchen"})

0 commit comments

Comments
 (0)