From fd6b56802a7cf35b9fdb5d4b68fcadfe3256f2d3 Mon Sep 17 00:00:00 2001 From: Pavel-Tk <110731619+Pavel-Tk@users.noreply.github.com> Date: Tue, 13 Oct 2026 16:32:33 +0000 Subject: [PATCH] Packaging test: check tooling pins exist, not their versions test_repository_root_is_not_a_python_project_for_hermes (from #56) asserted "ruff==0.9.10" and "pytest==9.0.3", so every Dependabot bump in tooling/ failed CI (#61, #62). It now checks that ruff and pytest are pinned to some version. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01PJwSpwAivFKrfusNkeh96b Signed-off-by: Pavel-Tk <110731619+Pavel-Tk@users.noreply.github.com> --- tests/test_packaging.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_packaging.py b/tests/test_packaging.py index 5aaaaae..935166b 100644 --- a/tests/test_packaging.py +++ b/tests/test_packaging.py @@ -2,6 +2,7 @@ from __future__ import annotations import json +import re import sys import zipfile from pathlib import Path @@ -133,7 +134,8 @@ def test_repository_root_is_not_a_python_project_for_hermes() -> None: assert not (REPOSITORY_ROOT / "pyproject.toml").exists() assert not (REPOSITORY_ROOT / "uv.lock").exists() tooling = (REPOSITORY_ROOT / "tooling" / "pyproject.toml").read_text(encoding="utf-8") - assert "ruff==0.9.10" in tooling and "pytest==9.0.3" in tooling + # Pinned, but not to a given version: Dependabot bumps these pins. + assert re.search(r'"ruff==[0-9][^"]*"', tooling) and re.search(r'"pytest==[0-9][^"]*"', tooling) assert "dependencies = []" in tooling assert (REPOSITORY_ROOT / "tooling" / "uv.lock").exists() assert (REPOSITORY_ROOT / "ruff.toml").exists() and (REPOSITORY_ROOT / "pytest.ini").exists()