Files
ss-tools/backend/tests/services/test_services___init__.py
root 632b730fff chore: migrate GRACE-Poly anchors to hierarchical dotted naming
Systematic rename of all semantic anchors (#region, [DEF], @RELATION)
across 1400+ files — backend Python, frontend Svelte/TS, specs, docs:
- Flat anchors become Namespace.Module.Entity
- @RELATION references updated to match new anchor paths
- Zero business logic changes
2026-07-22 11:48:15 +03:00

31 lines
1021 B
Python

# #region Test.ServicesInit [C:2] [TYPE Module] [SEMANTICS test,services,init,lazy-loading]
# @BRIEF Tests for services/__init__.py — lazy-loading __getattr__.
# @RELATION BINDS_TO -> [Services.Init.Services]
from pathlib import Path
import sys
sys.path.insert(0, str(Path(__file__).parent.parent.parent / "src"))
import pytest
class TestServicesInit:
def test_getattr_mapping_service(self):
import src.services as svc
ms = svc.MappingService
from src.services.mapping_service import MappingService
assert ms is MappingService
def test_getattr_resource_service(self):
import src.services as svc
rs = svc.ResourceService
from src.services.resource_service import ResourceService
assert rs is ResourceService
def test_getattr_raises_for_unknown(self):
import src.services as svc
with pytest.raises(AttributeError, match="has no attribute"):
svc.__getattr__("NonExistentService")
# #endregion Test.ServicesInit