auto-sync 2026-07-04T05:35:30Z workspace (part 4)
Browse files
workspace/tests/test_readme_only_markdown_flags.py
CHANGED
|
@@ -80,3 +80,13 @@ def test_readme_only_report_helpers_remove_stale_markdown(tmp_path: Path) -> Non
|
|
| 80 |
writer(out_dir)
|
| 81 |
|
| 82 |
assert not report_path.exists()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
writer(out_dir)
|
| 81 |
|
| 82 |
assert not report_path.exists()
|
| 83 |
+
|
| 84 |
+
|
| 85 |
+
def test_hf_sync_enforces_remote_readme_only_markdown_policy() -> None:
|
| 86 |
+
script = Path("scripts/hf_push_once.sh").read_text()
|
| 87 |
+
|
| 88 |
+
assert "HF_SYNC_CLEAN_REMOTE_MARKDOWN=\"${HF_SYNC_CLEAN_REMOTE_MARKDOWN:-1}\"" in script
|
| 89 |
+
assert "HF_SYNC_REMOTE_MARKDOWN_KEEP=\"${HF_SYNC_REMOTE_MARKDOWN_KEEP:-workspace/README.md}\"" in script
|
| 90 |
+
assert "cleanup_remote_markdown" in script
|
| 91 |
+
assert 'path.endswith(".md") and path not in keep' in script
|
| 92 |
+
assert "api.delete_files" in script
|