Files
AnyImage/tests/test_manifest.py
nan 92d2cea1d1 Add unit tests for service functionality and model caching
- Implement tests for ben2 and da3 model caching to ensure models are reused for matching runtime keys.
- Verify service state management, including client registration, job cancellation, and client expiration.
- Test discovery file creation and removal based on service ownership.
- Ensure frame extraction functionality works without models and produces expected results.
2026-08-13 00:35:40 +08:00

26 lines
818 B
Python

import tomllib
import unittest
from pathlib import Path
PROJECT_ROOT = Path(__file__).resolve().parents[1]
MANIFEST_PATH = PROJECT_ROOT / "src" / "snapform" / "blender_manifest.toml"
class ManifestTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.manifest = tomllib.loads(MANIFEST_PATH.read_text(encoding="utf-8"))
def test_declares_modern_extension_metadata(self):
self.assertEqual(self.manifest["schema_version"], "1.0.0")
self.assertEqual(self.manifest["id"], "snapform")
self.assertEqual(self.manifest["type"], "add-on")
self.assertNotIn("bl_info", self.manifest)
def test_declares_required_environment_permissions(self):
self.assertEqual(
set(self.manifest["permissions"]),
{"network", "files"},
)