09e9f3545f
CodeQL / Analyze (push) Waiting to run
dependency-audit / pip-audit (push) Waiting to run
Test / Code Quality (push) Has been cancelled
Test / Test (macos-latest, Python 3.10) (push) Has been cancelled
Test / Test (macos-latest, Python 3.11) (push) Has been cancelled
Test / Test (macos-latest, Python 3.12) (push) Has been cancelled
Test / Test (macos-latest, Python 3.13) (push) Has been cancelled
Test / Test (macos-latest, Python 3.14) (push) Has been cancelled
Test / Test (ubuntu-latest, Python 3.10) (push) Has been cancelled
Test / Test (ubuntu-latest, Python 3.11) (push) Has been cancelled
Test / Test (ubuntu-latest, Python 3.12) (push) Has been cancelled
Test / Test (ubuntu-latest, Python 3.13) (push) Has been cancelled
Test / Test (ubuntu-latest, Python 3.14) (push) Has been cancelled
Test / Test (windows-latest, Python 3.10) (push) Has been cancelled
Test / Test (windows-latest, Python 3.11) (push) Has been cancelled
Test / Test (windows-latest, Python 3.12) (push) Has been cancelled
Test / Test (windows-latest, Python 3.13) (push) Has been cancelled
Test / Test (windows-latest, Python 3.14) (push) Has been cancelled
38 lines
1.2 KiB
Python
38 lines
1.2 KiB
Python
"""Packaging smoke tests for skill assets."""
|
|
|
|
import shutil
|
|
import subprocess
|
|
import zipfile
|
|
from pathlib import Path
|
|
|
|
import pytest
|
|
|
|
|
|
def test_wheel_includes_root_skill_content(tmp_path):
|
|
"""The built wheel should carry the canonical repo agent docs into package data."""
|
|
if shutil.which("uv") is None:
|
|
pytest.skip("uv is required for build smoke tests")
|
|
|
|
repo_root = Path(__file__).resolve().parents[2]
|
|
build_dir = tmp_path / "dist"
|
|
result = subprocess.run(
|
|
["uv", "build", "--wheel", "--out-dir", str(build_dir)],
|
|
cwd=repo_root,
|
|
capture_output=True,
|
|
text=True,
|
|
check=False,
|
|
)
|
|
assert result.returncode == 0, result.stderr
|
|
|
|
wheel_path = next(build_dir.glob("*.whl"))
|
|
with zipfile.ZipFile(wheel_path) as wheel:
|
|
packaged_skill = wheel.read("notebooklm/data/SKILL.md").decode("utf-8")
|
|
packaged_codex = wheel.read("notebooklm/data/CODEX.md").decode("utf-8")
|
|
|
|
assert packaged_skill.replace("\r", "") == (repo_root / "SKILL.md").read_text(
|
|
encoding="utf-8"
|
|
).replace("\r", "")
|
|
assert packaged_codex.replace("\r", "") == (repo_root / "AGENTS.md").read_text(
|
|
encoding="utf-8"
|
|
).replace("\r", "")
|