Complete rewrite of all core modules with proper abstractions:
- FlowError hierarchy with PlanConflict and ExecutionError
- Pure template substitution ($VAR, ${VAR}, {{expr}})
- XDG path constants
- Frozen PlatformInfo dataclass with context detection
- Console with color/quiet/TTY support
- Runtime primitives (CommandRunner, FileSystem, GitClient, SystemRuntime)
- Config loading with target parsing and manifest merging
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
22 lines
579 B
Python
22 lines
579 B
Python
"""Tests for flow.core.errors."""
|
|
|
|
from flow.core.errors import ConfigError, ExecutionError, FlowError, PlanConflict
|
|
|
|
|
|
def test_flow_error_is_exception():
|
|
assert issubclass(FlowError, Exception)
|
|
|
|
|
|
def test_config_error_is_flow_error():
|
|
assert issubclass(ConfigError, FlowError)
|
|
|
|
|
|
def test_plan_conflict_carries_conflicts():
|
|
err = PlanConflict("2 conflicts", ["a exists", "b exists"])
|
|
assert str(err) == "2 conflicts"
|
|
assert err.conflicts == ["a exists", "b exists"]
|
|
|
|
|
|
def test_execution_error_is_flow_error():
|
|
assert issubclass(ExecutionError, FlowError)
|