Skip to content

Commit f13935f

Browse files
committed
fix(ci): seal 12th fix-forward — migrate test_w937 to repo_root helper
CI on 96f5ff4 failed: W588 drift-guard caught the test file created in wave-1 (W937, mojibake em-dash drift-guard) using fragile `Path(__file__).parent.parent` instead of canonical `tests._helpers.repo_root.repo_root()`. Same shape as the 10th fix-forward — agent created the test outside the W572 helper-aware mental model. Migrate the one line; ruff + drift-guard clean.
1 parent 96f5ff4 commit f13935f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tests/test_w937_no_mojibake_em_dashes.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@
2424
import os
2525
from pathlib import Path
2626

27+
from tests._helpers.repo_root import repo_root
28+
2729
# The signature byte sequence of cp1253-mojibake-ed UTF-8 em-dashes.
2830
# Hard-coded as raw bytes so this test stays decoupled from any
2931
# encoding-related helper.
3032
_MOJIBAKE_EM_DASH: bytes = b"\xce\xb2\xe2\x82\xac\xe2\x80\x9d"
3133

32-
_SRC_ROOT: Path = Path(__file__).parent.parent / "src" / "roam"
34+
_SRC_ROOT: Path = repo_root() / "src" / "roam"
3335

3436

3537
def test_src_roam_has_no_cp1253_mojibake_em_dashes() -> None:

0 commit comments

Comments
 (0)