Skip to content

Commit 87ecdb1

Browse files
cbeauchesneclaude
andauthored
test(ffe): ignore upstream Markdown docs when importing fixtures (#8649)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent b1b3e07 commit 87ecdb1

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

‎tests/test_the_test/test_update_ffe_fixtures.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ def test_copy_fixture_snapshot_imports_only_consumed_fixture_data(tmp_path: Path
6767
(suite / "cases").mkdir(parents=True)
6868
(suite / "ufc-config.json").write_text('{"flags": {"flag": {}}}', encoding="utf-8")
6969
(suite / "cases" / "case.json").write_text('[{"flag": "flag"}]', encoding="utf-8")
70+
(suite / "AGENTS.md").write_text("upstream instructions", encoding="utf-8")
7071
_write_selection_vectors(source)
7172
(source / "flag-selection" / "README.md").write_text("upstream documentation", encoding="utf-8")
7273
(source / "flag-selection" / "AGENTS.md").write_text("upstream instructions", encoding="utf-8")
@@ -77,6 +78,7 @@ def test_copy_fixture_snapshot_imports_only_consumed_fixture_data(tmp_path: Path
7778
assert (snapshot / "evaluation-cases" / "case.json").is_file()
7879
for path in (Path("ufc-config.json"), Path("cases/case.json")):
7980
assert (snapshot / "evaluation-suites" / "feature" / path).read_bytes() == (suite / path).read_bytes()
81+
assert not (snapshot / "evaluation-suites" / "feature" / "AGENTS.md").exists()
8082
assert not (snapshot / "README.md").exists()
8183
assert not (snapshot / "AGENTS.md").exists()
8284
assert not (snapshot / "precomputed-assignments").exists()

‎utils/scripts/update_ffe_fixtures.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ def _copy_entry(source: Path, destination: Path) -> None:
6363

6464
destination.mkdir(parents=True, exist_ok=True)
6565
for child in sorted(source.iterdir()):
66+
# Upstream documentation, such as a suite's AGENTS.md, is not fixture data.
67+
if child.suffix == ".md" and not child.is_dir():
68+
continue
6669
_copy_entry(child, destination / child.name)
6770

6871

0 commit comments

Comments
 (0)