From 1dc254b1fd62d23498bb6dd22f3f1d71c3453f47 Mon Sep 17 00:00:00 2001 From: DanMeon Date: Tue, 28 Apr 2026 17:12:06 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20docstrin?= =?UTF-8?q?g=20=EC=9D=98=20=EA=B0=80=EB=B3=80=20=EC=B9=B4=EC=9A=B4?= =?UTF-8?q?=ED=8A=B8=C2=B7=EC=8A=A4=ED=85=8C=EC=9D=B4=EC=A7=80=20=EB=A7=88?= =?UTF-8?q?=EC=BB=A4=20=EC=A0=95=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 다른 파일·CI 잡에 의존하는 카운트가 docstring 에 박혀 있어 변경 시 stale 되는 안티패턴 정정 (실제로 v0.3.0 막판 5→4 정정 누락 발생). - test_cli.py 의 "5 skipped 카운트 중 1" / "1 카운트" 제거 — gated 파일 카운트 검증은 ci.yml test-without-extras 잡이 SSOT - test_langchain_loader_ir.py 의 "exactly 29 테스트 유지" 제거 — 다른 파일의 카운트가 본 파일 docstring 에 박혀 invisible coupling 발생 - test_ir_schema_export.py 의 "S3 신규 5" 매직 넘버 제거 코드 동작 변화 없음 — docstring/comment only. Co-Authored-By: Claude Opus 4.7 (1M context) --- tests/test_cli.py | 8 ++++---- tests/test_ir_schema_export.py | 1 - tests/test_langchain_loader_ir.py | 7 +++---- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/tests/test_cli.py b/tests/test_cli.py index 8ad325d..d6ececc 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -1,8 +1,8 @@ """rhwp-py CLI 서브커맨드 smoke + 통합 테스트. -cli.md § 테스트 전략 — typer.testing.CliRunner 기반 smoke + 실제 sample 통합. -파일 레벨 ``importorskip("typer")`` 로 typer 미설치 시 file 전체 skip -(CI ``test-without-extras`` 잡의 5 skipped 카운트 중 1). +typer.testing.CliRunner 기반 smoke + 실제 sample 통합. 파일 레벨 +``importorskip("typer")`` 로 typer 미설치 시 file 전체 skip — gated 파일 +총 카운트 검증은 CI ``test-without-extras`` 잡이 SSOT. """ import json @@ -11,7 +11,7 @@ import pytest -# ^ typer / langchain extras 가드 — typer 미설치 시 file 전체 skip (1 카운트) +# ^ typer extras 가드 — 미설치 시 file 전체 skip pytest.importorskip("typer") import rhwp # noqa: E402 from rhwp.cli.app import app # noqa: E402 diff --git a/tests/test_ir_schema_export.py b/tests/test_ir_schema_export.py index c6aec49..9da2a0b 100644 --- a/tests/test_ir_schema_export.py +++ b/tests/test_ir_schema_export.py @@ -66,7 +66,6 @@ def test_export_schema_defs_are_exactly_the_known_nodes(): "FormulaBlock", "FootnoteBlock", "EndnoteBlock", - # ^ S3 신규 5 "ListItemBlock", "CaptionBlock", "TocBlock", diff --git a/tests/test_langchain_loader_ir.py b/tests/test_langchain_loader_ir.py index bfc8eeb..579a076 100644 --- a/tests/test_langchain_loader_ir.py +++ b/tests/test_langchain_loader_ir.py @@ -1,8 +1,7 @@ -"""Stage S5 — HwpLoader(mode="ir-blocks") pytest 스위트. +"""HwpLoader(mode="ir-blocks") pytest 스위트. -``test_langchain_loader.py`` 는 CLAUDE.md 규약상 exactly 29 테스트 유지 — -IR 모드 추가 테스트는 본 파일로 분리한다. 둘 모두 ``langchain_core`` 미설치 -시 파일 레벨 importorskip 으로 auto-skip. +``test_langchain_loader.py`` 와 분리 — 본 파일은 ir-blocks 모드 전용. +``langchain_core`` 미설치 시 파일 레벨 importorskip 으로 auto-skip. """ from pathlib import Path