2cab53bc94
Test Vector Database Adaptors / Test MCP Vector DB Tools (push) Has been cancelled
Tests / Code Quality (Ruff & Mypy) (push) Has been cancelled
Tests / Fast Unit Tests (parallel) (macos-latest, 3.11) (push) Has been cancelled
Tests / Fast Unit Tests (parallel) (macos-latest, 3.12) (push) Has been cancelled
Tests / Tests (push) Has been cancelled
Docker Publish / Build and Push Docker Images (map[description:Skill Seekers CLI - Convert documentation to AI skills dockerfile:Dockerfile name:skill-seekers]) (push) Has been cancelled
Docker Publish / Build and Push Docker Images (map[description:Skill Seekers MCP Server - 25 tools for AI assistants dockerfile:Dockerfile.mcp name:skill-seekers-mcp]) (push) Has been cancelled
Docker Publish / Test Docker Images (push) Has been cancelled
Tests / Fast Unit Tests (parallel) (ubuntu-latest, 3.10) (push) Has been cancelled
Tests / Fast Unit Tests (parallel) (ubuntu-latest, 3.11) (push) Has been cancelled
Tests / Fast Unit Tests (parallel) (ubuntu-latest, 3.12) (push) Has been cancelled
Tests / Serial / Integration / E2E Tests (push) Has been cancelled
Tests / MCP Server Tests (push) Has been cancelled
Test Vector Database Adaptors / Test chroma Adaptor (push) Has been cancelled
Test Vector Database Adaptors / Test faiss Adaptor (push) Has been cancelled
Test Vector Database Adaptors / Test qdrant Adaptor (push) Has been cancelled
Test Vector Database Adaptors / Test weaviate Adaptor (push) Has been cancelled
29 lines
1.0 KiB
Python
29 lines
1.0 KiB
Python
#!/usr/bin/env python3
|
|
"""Tests for signal_flow_analyzer.py (Godot signal-flow statistics)."""
|
|
|
|
import os
|
|
import sys
|
|
|
|
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "src"))
|
|
|
|
from skill_seekers.cli.signal_flow_analyzer import SignalFlowAnalyzer
|
|
|
|
|
|
class TestSignalFlowStatistics:
|
|
def test_total_emissions_counts_every_emission(self):
|
|
"""Regression for CBA-02: total_emissions must iterate .values() (the
|
|
emission lists), not .items() (which yields 2-tuples → always 2 per
|
|
signal, decoupled from the real count)."""
|
|
analyzer = SignalFlowAnalyzer({})
|
|
analyzer.signal_connections = {}
|
|
analyzer.files = []
|
|
analyzer.signal_emissions.clear()
|
|
# 5 + 5 = 10 emissions across 2 signals. The old .items() bug would
|
|
# report 2 * 2 = 4.
|
|
analyzer.signal_emissions["sig_a"] = [{} for _ in range(5)]
|
|
analyzer.signal_emissions["sig_b"] = [{} for _ in range(5)]
|
|
|
|
stats = analyzer._calculate_statistics()
|
|
|
|
assert stats["total_emissions"] == 10
|