mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-07-04 14:43:01 +02:00
- Add +x to Python scripts with shebangs (3 files) - Remove -x from non-script files like .cpp, .txt, makefile (23 files) - Move shebang to first line in C/imageViewer/lint.sh
17 lines
429 B
Python
17 lines
429 B
Python
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():
|
|
assert os.path.exists(SITE_FILE), f"Missing site file: {SITE_FILE}"
|
|
|
|
|
|
def test_site_size_under_budget():
|
|
size = os.path.getsize(SITE_FILE)
|
|
assert size <= BUDGET, f"Site size {size} bytes exceeds budget {BUDGET}"
|