|
Option C Tools
|
Functions | |
| str | _index_text () |
| test_no_external_font_hosts_in_index_html () | |
| test_every_font_face_src_points_at_local_woff2 () | |
Variables | |
| REPO_ROOT = Path(__file__).resolve().parents[3] | |
| str | INDEX_HTML = REPO_ROOT / "assets" / "index.html" |
| str | FONTS_DIR = REPO_ROOT / "assets" / "fonts" |
Purpose
-------
OI-532 regression — ``assets/index.html`` must render without reaching
out to ``fonts.googleapis.com`` or ``fonts.gstatic.com``. Web fonts are
self-hosted under ``assets/fonts/`` and referenced via inline
``@font-face`` declarations.
Responsibilities
----------------
- No ``fonts.googleapis.com`` / ``fonts.gstatic.com`` hosts appear.
- Every ``@font-face`` ``src: url(...)`` points at a relative path
rooted in ``fonts/``, and the target ``.woff2`` file exists on disk.
Diagnostics
-----------
Domain: ASSETS-TESTS
Levels:
L2 — test lifecycle
L3 — assertion details
L4 — deep tracing
Contracts
---------
- Tests read ``assets/index.html`` from the repository root; no temp
files are created.
- All assertions are read-only checks against existing project assets.
|
protected |
Definition at line 45 of file test_index_html_offline.py.
| test_index_html_offline.test_every_font_face_src_points_at_local_woff2 | ( | ) |
| test_index_html_offline.test_no_external_font_hosts_in_index_html | ( | ) |
| str test_index_html_offline.FONTS_DIR = REPO_ROOT / "assets" / "fonts" |
Definition at line 42 of file test_index_html_offline.py.
| str test_index_html_offline.INDEX_HTML = REPO_ROOT / "assets" / "index.html" |
Definition at line 41 of file test_index_html_offline.py.
| test_index_html_offline.REPO_ROOT = Path(__file__).resolve().parents[3] |
Definition at line 40 of file test_index_html_offline.py.