Option C Tools
Loading...
Searching...
No Matches
test_index_html_offline Namespace Reference

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"

Detailed Description

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.

Function Documentation

◆ _index_text()

str test_index_html_offline._index_text ( )
protected

Definition at line 45 of file test_index_html_offline.py.

Here is the caller graph for this function:

◆ test_every_font_face_src_points_at_local_woff2()

test_index_html_offline.test_every_font_face_src_points_at_local_woff2 ( )

Definition at line 61 of file test_index_html_offline.py.

Here is the call graph for this function:

◆ test_no_external_font_hosts_in_index_html()

test_index_html_offline.test_no_external_font_hosts_in_index_html ( )

Definition at line 49 of file test_index_html_offline.py.

Here is the call graph for this function:

Variable Documentation

◆ FONTS_DIR

str test_index_html_offline.FONTS_DIR = REPO_ROOT / "assets" / "fonts"

Definition at line 42 of file test_index_html_offline.py.

◆ INDEX_HTML

str test_index_html_offline.INDEX_HTML = REPO_ROOT / "assets" / "index.html"

Definition at line 41 of file test_index_html_offline.py.

◆ REPO_ROOT

test_index_html_offline.REPO_ROOT = Path(__file__).resolve().parents[3]

Definition at line 40 of file test_index_html_offline.py.