@@ -0,0 +1,30 @@
|
||||
"""Статика UI: без CDN, обязательные локальные шрифты и скрипты."""
|
||||
|
||||
import subprocess
|
||||
import sys
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
ROOT = Path(__file__).resolve().parent.parent
|
||||
VERIFY = ROOT / "scripts" / "verify_static_offline_assets.py"
|
||||
|
||||
|
||||
class StaticOfflineAssetsTest(unittest.TestCase):
|
||||
def test_static_assets_are_offline_ready(self) -> None:
|
||||
proc = subprocess.run(
|
||||
[sys.executable, str(VERIFY)],
|
||||
cwd=str(ROOT),
|
||||
capture_output=True,
|
||||
text=True,
|
||||
)
|
||||
if proc.returncode != 0:
|
||||
self.fail(
|
||||
"Offline static guard failed:\n"
|
||||
+ (proc.stdout or "")
|
||||
+ (proc.stderr or "")
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user