Files
AnyImage/tests/test_manifest.py
nan b02372c457 Add SnapForm panels, preferences, properties, and runtime management
- Implemented RuntimeModelsPanel and DebugPanel for UI integration in Blender.
- Created SnapFormPreferences to manage user settings for storage and runtime configuration.
- Defined SnapFormSettings to hold various properties related to input, model selection, and export options.
- Developed runtime management functions for installation, model downloading, and reconstruction commands.
- Added status bar functionality to display job progress and status in the Blender UI.
- Implemented worker script for handling model downloads and depth reconstruction tasks.
- Introduced unit tests for download progress reporting and image depth extraction functionalities.
2026-08-03 10:13:33 +08:00

26 lines
814 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_runtime_permissions(self):
self.assertEqual(
set(self.manifest["permissions"]),
{"network", "files"},
)