Refactor Entropix to FlakeStorm

- Rename all instances of Entropix to FlakeStorm
- Rename package from entropix to flakestorm
- Update all class names (EntropixConfig -> FlakeStormConfig, EntropixRunner -> FlakeStormRunner)
- Update Rust module from entropix_rust to flakestorm_rust
- Update README: remove cloud comparison, update links to flakestorm.com
- Update .gitignore to allow docs files referenced in README
- Add origin remote for VS Code compatibility
- Fix missing imports and type references
- All imports and references updated throughout codebase
This commit is contained in:
Entropix 2025-12-29 11:15:18 +08:00
parent 7b75fc9530
commit 61652be09b
48 changed files with 586 additions and 425 deletions

View file

@ -1,3 +1,3 @@
"""
Entropix Test Suite
flakestorm Test Suite
"""

View file

@ -1,4 +1,4 @@
"""Shared test fixtures for Entropix tests."""
"""Shared test fixtures for flakestorm tests."""
import sys
import tempfile
@ -45,7 +45,7 @@ invariants:
@pytest.fixture
def config_file(temp_dir, sample_config_yaml):
"""Create a config file in temp directory."""
config_path = temp_dir / "entropix.yaml"
config_path = temp_dir / "flakestorm.yaml"
config_path.write_text(sample_config_yaml)
return config_path
@ -73,6 +73,6 @@ invariants: []
@pytest.fixture
def minimal_config_file(temp_dir, minimal_config_yaml):
"""Create a minimal config file."""
config_path = temp_dir / "entropix.yaml"
config_path = temp_dir / "flakestorm.yaml"
config_path.write_text(minimal_config_yaml)
return config_path

View file

@ -8,7 +8,7 @@ class TestHTTPAgentAdapter:
def test_adapter_creation(self):
"""Test adapter can be created."""
from entropix.core.protocol import HTTPAgentAdapter
from flakestorm.core.protocol import HTTPAgentAdapter
adapter = HTTPAgentAdapter(
endpoint="http://localhost:8000/chat",
@ -19,7 +19,7 @@ class TestHTTPAgentAdapter:
def test_adapter_has_invoke_method(self):
"""Adapter has invoke method."""
from entropix.core.protocol import HTTPAgentAdapter
from flakestorm.core.protocol import HTTPAgentAdapter
adapter = HTTPAgentAdapter(endpoint="http://localhost:8000/chat")
assert hasattr(adapter, "invoke")
@ -27,7 +27,7 @@ class TestHTTPAgentAdapter:
def test_timeout_conversion(self):
"""Timeout is converted to seconds."""
from entropix.core.protocol import HTTPAgentAdapter
from flakestorm.core.protocol import HTTPAgentAdapter
adapter = HTTPAgentAdapter(
endpoint="http://localhost:8000/chat",
@ -38,7 +38,7 @@ class TestHTTPAgentAdapter:
def test_custom_headers(self):
"""Custom headers can be set."""
from entropix.core.protocol import HTTPAgentAdapter
from flakestorm.core.protocol import HTTPAgentAdapter
headers = {"Authorization": "Bearer token123"}
adapter = HTTPAgentAdapter(
@ -53,7 +53,7 @@ class TestPythonAgentAdapter:
def test_adapter_creation_with_callable(self):
"""Test adapter can be created with a callable."""
from entropix.core.protocol import PythonAgentAdapter
from flakestorm.core.protocol import PythonAgentAdapter
def my_agent(input: str) -> str:
return f"Response to: {input}"
@ -64,7 +64,7 @@ class TestPythonAgentAdapter:
def test_adapter_has_invoke_method(self):
"""Adapter has invoke method."""
from entropix.core.protocol import PythonAgentAdapter
from flakestorm.core.protocol import PythonAgentAdapter
def my_agent(input: str) -> str:
return f"Response to: {input}"
@ -80,7 +80,7 @@ class TestLangChainAgentAdapter:
@pytest.fixture
def langchain_config(self):
"""Create a test LangChain agent config."""
from entropix.core.config import AgentConfig, AgentType
from flakestorm.core.config import AgentConfig, AgentType
return AgentConfig(
endpoint="my_agent:chain",
@ -90,7 +90,7 @@ class TestLangChainAgentAdapter:
def test_adapter_creation(self, langchain_config):
"""Test adapter can be created."""
from entropix.core.protocol import LangChainAgentAdapter
from flakestorm.core.protocol import LangChainAgentAdapter
adapter = LangChainAgentAdapter(langchain_config)
assert adapter is not None
@ -101,8 +101,8 @@ class TestAgentAdapterFactory:
def test_creates_http_adapter(self):
"""Factory creates HTTP adapter for HTTP type."""
from entropix.core.config import AgentConfig, AgentType
from entropix.core.protocol import HTTPAgentAdapter, create_agent_adapter
from flakestorm.core.config import AgentConfig, AgentType
from flakestorm.core.protocol import HTTPAgentAdapter, create_agent_adapter
config = AgentConfig(
endpoint="http://localhost:8000/chat",
@ -113,7 +113,7 @@ class TestAgentAdapterFactory:
def test_creates_python_adapter(self):
"""Python adapter can be created with a callable."""
from entropix.core.protocol import PythonAgentAdapter
from flakestorm.core.protocol import PythonAgentAdapter
def my_agent(input: str) -> str:
return f"Response: {input}"
@ -123,8 +123,8 @@ class TestAgentAdapterFactory:
def test_creates_langchain_adapter(self):
"""Factory creates LangChain adapter for LangChain type."""
from entropix.core.config import AgentConfig, AgentType
from entropix.core.protocol import LangChainAgentAdapter, create_agent_adapter
from flakestorm.core.config import AgentConfig, AgentType
from flakestorm.core.protocol import LangChainAgentAdapter, create_agent_adapter
config = AgentConfig(
endpoint="my_agent:chain",
@ -139,7 +139,7 @@ class TestAgentResponse:
def test_response_creation(self):
"""Test AgentResponse can be created."""
from entropix.core.protocol import AgentResponse
from flakestorm.core.protocol import AgentResponse
response = AgentResponse(
output="Hello, world!",
@ -150,7 +150,7 @@ class TestAgentResponse:
def test_response_with_error(self):
"""Test AgentResponse with error."""
from entropix.core.protocol import AgentResponse
from flakestorm.core.protocol import AgentResponse
response = AgentResponse(
output="",
@ -162,7 +162,7 @@ class TestAgentResponse:
def test_response_success_property(self):
"""Test AgentResponse success property."""
from entropix.core.protocol import AgentResponse
from flakestorm.core.protocol import AgentResponse
# Success case
success_response = AgentResponse(

View file

@ -2,15 +2,15 @@
Tests for the assertion/invariant system.
"""
from entropix.assertions.deterministic import (
from flakestorm.assertions.deterministic import (
ContainsChecker,
LatencyChecker,
RegexChecker,
ValidJsonChecker,
)
from entropix.assertions.safety import ExcludesPIIChecker, RefusalChecker
from entropix.assertions.verifier import InvariantVerifier
from entropix.core.config import InvariantConfig, InvariantType
from flakestorm.assertions.safety import ExcludesPIIChecker, RefusalChecker
from flakestorm.assertions.verifier import InvariantVerifier
from flakestorm.core.config import InvariantConfig, InvariantType
class TestContainsChecker:

View file

@ -5,7 +5,7 @@ from pathlib import Path
from typer.testing import CliRunner
from entropix.cli.main import app
from flakestorm.cli.main import app
runner = CliRunner()
@ -17,7 +17,7 @@ class TestHelpCommand:
"""Main help displays correctly."""
result = runner.invoke(app, ["--help"])
assert result.exit_code == 0
assert "run" in result.output.lower() or "entropix" in result.output.lower()
assert "run" in result.output.lower() or "flakestorm" in result.output.lower()
def test_run_help(self):
"""Run command help displays options."""
@ -37,11 +37,11 @@ class TestHelpCommand:
class TestInitCommand:
"""Tests for `entropix init`."""
"""Tests for `flakestorm init`."""
def test_init_creates_config(self):
"""init creates entropix.yaml."""
with tempfile.TemporaryDirectory() as tmpdir:
"""init creates flakestorm.yaml."""
with tempfile.TemporaryDirectory():
# Change to temp directory context
result = runner.invoke(app, ["init"], catch_exceptions=False)
@ -55,12 +55,12 @@ class TestInitCommand:
class TestVerifyCommand:
"""Tests for `entropix verify`."""
"""Tests for `flakestorm verify`."""
def test_verify_valid_config(self):
"""verify accepts valid config."""
with tempfile.TemporaryDirectory() as tmpdir:
config_path = Path(tmpdir) / "entropix.yaml"
config_path = Path(tmpdir) / "flakestorm.yaml"
config_path.write_text(
"""
agent:
@ -96,7 +96,7 @@ invariants: []
def test_verify_invalid_yaml(self):
"""verify rejects invalid YAML syntax."""
with tempfile.TemporaryDirectory() as tmpdir:
config_path = Path(tmpdir) / "entropix.yaml"
config_path = Path(tmpdir) / "flakestorm.yaml"
config_path.write_text("invalid: yaml: : content")
result = runner.invoke(app, ["verify", "--config", str(config_path)])
@ -105,7 +105,7 @@ invariants: []
class TestRunCommand:
"""Tests for `entropix run`."""
"""Tests for `flakestorm run`."""
def test_run_missing_config(self):
"""run handles missing config."""
@ -132,7 +132,7 @@ class TestRunCommand:
class TestReportCommand:
"""Tests for `entropix report`."""
"""Tests for `flakestorm report`."""
def test_report_help(self):
"""report command has help."""
@ -141,7 +141,7 @@ class TestReportCommand:
class TestScoreCommand:
"""Tests for `entropix score`."""
"""Tests for `flakestorm score`."""
def test_score_help(self):
"""score command has help."""

View file

@ -7,10 +7,10 @@ from pathlib import Path
import pytest
from entropix.core.config import (
from flakestorm.core.config import (
AgentConfig,
AgentType,
EntropixConfig,
FlakeStormConfig,
InvariantConfig,
InvariantType,
MutationConfig,
@ -20,8 +20,8 @@ from entropix.core.config import (
)
class TestEntropixConfig:
"""Tests for EntropixConfig."""
class TestFlakeStormConfig:
"""Tests for FlakeStormConfig."""
def test_create_default_config(self):
"""Test creating a default configuration."""
@ -60,7 +60,7 @@ invariants:
- type: "latency"
max_ms: 1000
"""
config = EntropixConfig.from_yaml(yaml_content)
config = FlakeStormConfig.from_yaml(yaml_content)
assert config.agent.endpoint == "http://localhost:8000/test"
assert config.agent.timeout == 5000

View file

@ -4,8 +4,8 @@ Tests for the mutation engine.
import pytest
from entropix.mutations.templates import MutationTemplates
from entropix.mutations.types import Mutation, MutationType
from flakestorm.mutations.templates import MutationTemplates
from flakestorm.mutations.types import Mutation, MutationType
class TestMutationType:

View file

@ -1,4 +1,4 @@
"""Tests for the Entropix orchestrator."""
"""Tests for the flakestorm orchestrator."""
from datetime import datetime
from unittest.mock import MagicMock
@ -11,7 +11,7 @@ class TestOrchestratorState:
def test_initial_state(self):
"""State initializes correctly."""
from entropix.core.orchestrator import OrchestratorState
from flakestorm.core.orchestrator import OrchestratorState
state = OrchestratorState()
assert state.total_mutations == 0
@ -20,7 +20,7 @@ class TestOrchestratorState:
def test_state_started_at(self):
"""State records start time."""
from entropix.core.orchestrator import OrchestratorState
from flakestorm.core.orchestrator import OrchestratorState
state = OrchestratorState()
assert state.started_at is not None
@ -28,7 +28,7 @@ class TestOrchestratorState:
def test_state_updates(self):
"""State updates as tests run."""
from entropix.core.orchestrator import OrchestratorState
from flakestorm.core.orchestrator import OrchestratorState
state = OrchestratorState()
state.total_mutations = 10
@ -38,7 +38,7 @@ class TestOrchestratorState:
def test_state_duration_seconds(self):
"""State calculates duration."""
from entropix.core.orchestrator import OrchestratorState
from flakestorm.core.orchestrator import OrchestratorState
state = OrchestratorState()
duration = state.duration_seconds
@ -47,7 +47,7 @@ class TestOrchestratorState:
def test_state_progress_percentage(self):
"""State calculates progress percentage."""
from entropix.core.orchestrator import OrchestratorState
from flakestorm.core.orchestrator import OrchestratorState
state = OrchestratorState()
state.total_mutations = 100
@ -61,15 +61,15 @@ class TestOrchestrator:
@pytest.fixture
def mock_config(self):
"""Create a minimal test config."""
from entropix.core.config import (
from flakestorm.core.config import (
AgentConfig,
AgentType,
EntropixConfig,
FlakeStormConfig,
MutationConfig,
)
from entropix.mutations.types import MutationType
from flakestorm.mutations.types import MutationType
return EntropixConfig(
return FlakeStormConfig(
agent=AgentConfig(
endpoint="http://localhost:8000/chat",
type=AgentType.HTTP,
@ -107,7 +107,7 @@ class TestOrchestrator:
self, mock_config, mock_agent, mock_mutation_engine, mock_verifier
):
"""Orchestrator can be created with all required arguments."""
from entropix.core.orchestrator import Orchestrator
from flakestorm.core.orchestrator import Orchestrator
orchestrator = Orchestrator(
config=mock_config,
@ -122,7 +122,7 @@ class TestOrchestrator:
self, mock_config, mock_agent, mock_mutation_engine, mock_verifier
):
"""Orchestrator has run method."""
from entropix.core.orchestrator import Orchestrator
from flakestorm.core.orchestrator import Orchestrator
orchestrator = Orchestrator(
config=mock_config,
@ -137,7 +137,7 @@ class TestOrchestrator:
self, mock_config, mock_agent, mock_mutation_engine, mock_verifier
):
"""Orchestrator initializes state correctly."""
from entropix.core.orchestrator import Orchestrator
from flakestorm.core.orchestrator import Orchestrator
orchestrator = Orchestrator(
config=mock_config,
@ -152,7 +152,7 @@ class TestOrchestrator:
self, mock_config, mock_agent, mock_mutation_engine, mock_verifier
):
"""Orchestrator stores all components."""
from entropix.core.orchestrator import Orchestrator
from flakestorm.core.orchestrator import Orchestrator
orchestrator = Orchestrator(
config=mock_config,
@ -170,7 +170,7 @@ class TestOrchestrator:
"""Orchestrator accepts optional console."""
from rich.console import Console
from entropix.core.orchestrator import Orchestrator
from flakestorm.core.orchestrator import Orchestrator
custom_console = Console()
orchestrator = Orchestrator(
@ -186,7 +186,7 @@ class TestOrchestrator:
self, mock_config, mock_agent, mock_mutation_engine, mock_verifier
):
"""Orchestrator accepts show_progress flag."""
from entropix.core.orchestrator import Orchestrator
from flakestorm.core.orchestrator import Orchestrator
orchestrator = Orchestrator(
config=mock_config,
@ -203,8 +203,8 @@ class TestMutationGeneration:
def test_mutation_count_calculation(self):
"""Test mutation count is calculated correctly."""
from entropix.core.config import MutationConfig
from entropix.mutations.types import MutationType
from flakestorm.core.config import MutationConfig
from flakestorm.mutations.types import MutationType
config = MutationConfig(
count=10,
@ -214,8 +214,8 @@ class TestMutationGeneration:
def test_mutation_types_configuration(self):
"""Test mutation types are configured correctly."""
from entropix.core.config import MutationConfig
from entropix.mutations.types import MutationType
from flakestorm.core.config import MutationConfig
from flakestorm.mutations.types import MutationType
config = MutationConfig(
count=5,

View file

@ -9,7 +9,7 @@ from pathlib import Path
# Import the performance module directly to avoid heavy dependencies like pydantic
_perf_path = (
Path(__file__).parent.parent / "src" / "entropix" / "core" / "performance.py"
Path(__file__).parent.parent / "src" / "flakestorm" / "core" / "performance.py"
)
_spec = importlib.util.spec_from_file_location("performance", _perf_path)
_performance = importlib.util.module_from_spec(_spec)

View file

@ -7,7 +7,7 @@ from pathlib import Path
import pytest
from entropix.mutations.types import Mutation, MutationType
from flakestorm.mutations.types import Mutation, MutationType
class TestCheckResult:
@ -15,7 +15,7 @@ class TestCheckResult:
def test_check_result_creation(self):
"""CheckResult can be created."""
from entropix.reports.models import CheckResult
from flakestorm.reports.models import CheckResult
result = CheckResult(
check_type="contains",
@ -28,7 +28,7 @@ class TestCheckResult:
def test_check_result_to_dict(self):
"""CheckResult converts to dict."""
from entropix.reports.models import CheckResult
from flakestorm.reports.models import CheckResult
result = CheckResult(
check_type="latency",
@ -55,7 +55,7 @@ class TestMutationResult:
def test_mutation_result_creation(self, sample_mutation):
"""MutationResult can be created."""
from entropix.reports.models import MutationResult
from flakestorm.reports.models import MutationResult
result = MutationResult(
original_prompt="What is the weather?",
@ -70,7 +70,7 @@ class TestMutationResult:
def test_mutation_result_with_checks(self, sample_mutation):
"""MutationResult with check results."""
from entropix.reports.models import CheckResult, MutationResult
from flakestorm.reports.models import CheckResult, MutationResult
checks = [
CheckResult(check_type="contains", passed=True, details="Found 'weather'"),
@ -90,7 +90,7 @@ class TestMutationResult:
def test_mutation_result_failed_checks(self, sample_mutation):
"""MutationResult returns failed checks."""
from entropix.reports.models import CheckResult, MutationResult
from flakestorm.reports.models import CheckResult, MutationResult
checks = [
CheckResult(check_type="contains", passed=True, details="OK"),
@ -114,7 +114,7 @@ class TestTypeStatistics:
def test_type_statistics_creation(self):
"""TypeStatistics can be created."""
from entropix.reports.models import TypeStatistics
from flakestorm.reports.models import TypeStatistics
stats = TypeStatistics(
mutation_type="paraphrase",
@ -129,7 +129,7 @@ class TestTypeStatistics:
def test_type_statistics_to_dict(self):
"""TypeStatistics converts to dict."""
from entropix.reports.models import TypeStatistics
from flakestorm.reports.models import TypeStatistics
stats = TypeStatistics(
mutation_type="noise",
@ -147,7 +147,7 @@ class TestTestStatistics:
def test_statistics_creation(self):
"""TestStatistics can be created."""
from entropix.reports.models import TestStatistics
from flakestorm.reports.models import TestStatistics
stats = TestStatistics(
total_mutations=100,
@ -165,7 +165,7 @@ class TestTestStatistics:
def test_statistics_pass_rate(self):
"""Statistics calculates pass_rate correctly."""
from entropix.reports.models import TestStatistics
from flakestorm.reports.models import TestStatistics
stats = TestStatistics(
total_mutations=100,
@ -181,7 +181,7 @@ class TestTestStatistics:
def test_statistics_zero_total(self):
"""Statistics handles zero total."""
from entropix.reports.models import TestStatistics
from flakestorm.reports.models import TestStatistics
stats = TestStatistics(
total_mutations=0,
@ -202,13 +202,13 @@ class TestTestResults:
@pytest.fixture
def sample_config(self):
"""Create sample config."""
from entropix.core.config import (
from flakestorm.core.config import (
AgentConfig,
AgentType,
EntropixConfig,
FlakeStormConfig,
)
return EntropixConfig(
return FlakeStormConfig(
agent=AgentConfig(
endpoint="http://localhost:8000/chat",
type=AgentType.HTTP,
@ -220,7 +220,7 @@ class TestTestResults:
@pytest.fixture
def sample_statistics(self):
"""Create sample statistics."""
from entropix.reports.models import TestStatistics
from flakestorm.reports.models import TestStatistics
return TestStatistics(
total_mutations=10,
@ -235,7 +235,7 @@ class TestTestResults:
def test_results_creation(self, sample_config, sample_statistics):
"""TestResults can be created."""
from entropix.reports.models import TestResults
from flakestorm.reports.models import TestResults
now = datetime.now()
results = TestResults(
@ -255,13 +255,13 @@ class TestHTMLReportGenerator:
@pytest.fixture
def sample_config(self):
"""Create sample config."""
from entropix.core.config import (
from flakestorm.core.config import (
AgentConfig,
AgentType,
EntropixConfig,
FlakeStormConfig,
)
return EntropixConfig(
return FlakeStormConfig(
agent=AgentConfig(
endpoint="http://localhost:8000/chat",
type=AgentType.HTTP,
@ -273,7 +273,7 @@ class TestHTMLReportGenerator:
@pytest.fixture
def sample_statistics(self):
"""Create sample statistics."""
from entropix.reports.models import TestStatistics
from flakestorm.reports.models import TestStatistics
return TestStatistics(
total_mutations=10,
@ -289,7 +289,7 @@ class TestHTMLReportGenerator:
@pytest.fixture
def sample_results(self, sample_config, sample_statistics):
"""Create sample test results."""
from entropix.reports.models import TestResults
from flakestorm.reports.models import TestResults
now = datetime.now()
return TestResults(
@ -302,14 +302,14 @@ class TestHTMLReportGenerator:
def test_generator_creation(self, sample_results):
"""Generator can be created."""
from entropix.reports.html import HTMLReportGenerator
from flakestorm.reports.html import HTMLReportGenerator
generator = HTMLReportGenerator(sample_results)
assert generator is not None
def test_generate_returns_string(self, sample_results):
"""Generator returns HTML string."""
from entropix.reports.html import HTMLReportGenerator
from flakestorm.reports.html import HTMLReportGenerator
generator = HTMLReportGenerator(sample_results)
html = generator.generate()
@ -319,7 +319,7 @@ class TestHTMLReportGenerator:
def test_generate_valid_html_structure(self, sample_results):
"""Generated HTML has valid structure."""
from entropix.reports.html import HTMLReportGenerator
from flakestorm.reports.html import HTMLReportGenerator
generator = HTMLReportGenerator(sample_results)
html = generator.generate()
@ -329,7 +329,7 @@ class TestHTMLReportGenerator:
def test_contains_robustness_score(self, sample_results):
"""Report contains robustness score."""
from entropix.reports.html import HTMLReportGenerator
from flakestorm.reports.html import HTMLReportGenerator
generator = HTMLReportGenerator(sample_results)
html = generator.generate()
@ -339,7 +339,7 @@ class TestHTMLReportGenerator:
def test_save_creates_file(self, sample_results):
"""save() creates file on disk."""
from entropix.reports.html import HTMLReportGenerator
from flakestorm.reports.html import HTMLReportGenerator
with tempfile.TemporaryDirectory() as tmpdir:
generator = HTMLReportGenerator(sample_results)
@ -356,13 +356,13 @@ class TestJSONReportGenerator:
@pytest.fixture
def sample_config(self):
"""Create sample config."""
from entropix.core.config import (
from flakestorm.core.config import (
AgentConfig,
AgentType,
EntropixConfig,
FlakeStormConfig,
)
return EntropixConfig(
return FlakeStormConfig(
agent=AgentConfig(
endpoint="http://localhost:8000/chat",
type=AgentType.HTTP,
@ -374,7 +374,7 @@ class TestJSONReportGenerator:
@pytest.fixture
def sample_statistics(self):
"""Create sample statistics."""
from entropix.reports.models import TestStatistics
from flakestorm.reports.models import TestStatistics
return TestStatistics(
total_mutations=10,
@ -390,7 +390,7 @@ class TestJSONReportGenerator:
@pytest.fixture
def sample_results(self, sample_config, sample_statistics):
"""Create sample test results."""
from entropix.reports.models import TestResults
from flakestorm.reports.models import TestResults
ts = datetime(2024, 1, 15, 12, 0, 0)
return TestResults(
@ -403,14 +403,14 @@ class TestJSONReportGenerator:
def test_generator_creation(self, sample_results):
"""Generator can be created."""
from entropix.reports.json_export import JSONReportGenerator
from flakestorm.reports.json_export import JSONReportGenerator
generator = JSONReportGenerator(sample_results)
assert generator is not None
def test_generate_valid_json(self, sample_results):
"""Generator produces valid JSON."""
from entropix.reports.json_export import JSONReportGenerator
from flakestorm.reports.json_export import JSONReportGenerator
generator = JSONReportGenerator(sample_results)
json_str = generator.generate()
@ -421,7 +421,7 @@ class TestJSONReportGenerator:
def test_contains_statistics(self, sample_results):
"""JSON contains statistics."""
from entropix.reports.json_export import JSONReportGenerator
from flakestorm.reports.json_export import JSONReportGenerator
generator = JSONReportGenerator(sample_results)
data = json.loads(generator.generate())
@ -431,7 +431,7 @@ class TestJSONReportGenerator:
def test_save_creates_file(self, sample_results):
"""save() creates JSON file on disk."""
from entropix.reports.json_export import JSONReportGenerator
from flakestorm.reports.json_export import JSONReportGenerator
with tempfile.TemporaryDirectory() as tmpdir:
generator = JSONReportGenerator(sample_results)
@ -448,13 +448,13 @@ class TestTerminalReporter:
@pytest.fixture
def sample_config(self):
"""Create sample config."""
from entropix.core.config import (
from flakestorm.core.config import (
AgentConfig,
AgentType,
EntropixConfig,
FlakeStormConfig,
)
return EntropixConfig(
return FlakeStormConfig(
agent=AgentConfig(
endpoint="http://localhost:8000/chat",
type=AgentType.HTTP,
@ -466,7 +466,7 @@ class TestTerminalReporter:
@pytest.fixture
def sample_statistics(self):
"""Create sample statistics."""
from entropix.reports.models import TestStatistics
from flakestorm.reports.models import TestStatistics
return TestStatistics(
total_mutations=10,
@ -482,7 +482,7 @@ class TestTerminalReporter:
@pytest.fixture
def sample_results(self, sample_config, sample_statistics):
"""Create sample test results."""
from entropix.reports.models import TestResults
from flakestorm.reports.models import TestResults
now = datetime.now()
return TestResults(
@ -495,14 +495,14 @@ class TestTerminalReporter:
def test_reporter_creation(self, sample_results):
"""Reporter can be created."""
from entropix.reports.terminal import TerminalReporter
from flakestorm.reports.terminal import TerminalReporter
reporter = TerminalReporter(sample_results)
assert reporter is not None
def test_reporter_has_print_methods(self, sample_results):
"""Reporter has print methods."""
from entropix.reports.terminal import TerminalReporter
from flakestorm.reports.terminal import TerminalReporter
reporter = TerminalReporter(sample_results)
assert hasattr(reporter, "print_summary")