mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-07-06 20:23:01 +02:00
- Added module docstrings to 19 Python files - Added class docstrings to 5 classes (ScreenLocker, PokerModifierApp, etc.) - Added method docstrings to 22 methods - Added function docstrings to 25 functions - Added __init__ docstrings to 5 classes - Removed D100-D107 from ruff ignore list (docstrings now enforced) - Removed deprecated ANN101, ANN102, UP038 rules from ignore list - Fixed UP038: use union types in isinstance() calls - All ruff checks now pass with full docstring enforcement
21 lines
591 B
Python
21 lines
591 B
Python
"""Tests to ensure website stays within size budget."""
|
|
|
|
import os
|
|
|
|
# Budget for the entire website (single file) in bytes
|
|
BUDGET = 14 * 1024 # 14 KiB
|
|
|
|
HERE = os.path.dirname(__file__)
|
|
SITE_FILE = os.path.join(HERE, "index.html")
|
|
|
|
|
|
def test_site_file_exists():
|
|
"""Verify the main site HTML file exists."""
|
|
assert os.path.exists(SITE_FILE), f"Missing site file: {SITE_FILE}"
|
|
|
|
|
|
def test_site_size_under_budget():
|
|
"""Verify site size is under the defined budget."""
|
|
size = os.path.getsize(SITE_FILE)
|
|
assert size <= BUDGET, f"Site size {size} bytes exceeds budget {BUDGET}"
|