first commit
Verify / test (push) Failing after 2m54s

This commit is contained in:
2026-11-05 17:31:17 +03:30
کامیت 56c5ee23d3
63فایلهای تغییر یافته به همراه2749 افزوده شده و 0 حذف شده
@@ -0,0 +1,12 @@
import json
from pathlib import Path
import pytest
from app.fonts import fonts,stylesheet
def test_font_manifest_only_allows_explicit_local_paths(tmp_path,monkeypatch):
monkeypatch.setenv('FONT_DIR',str(tmp_path)); (tmp_path/'test.woff2').write_bytes(b'font fixture')
(tmp_path/'fonts.json').write_text(json.dumps({'Arial':[{'file':'test.woff2','weight':'bold','style':'italic'}]}))
assert len(fonts())==1 and "font-weight:bold" in stylesheet()
(tmp_path/'fonts.json').write_text(json.dumps({'Arial':'../outside.woff2'}))
with pytest.raises(ValueError):fonts()