feat: rewrite core layer (errors, template, paths, platform, console, runtime, config)
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>
This commit is contained in:
21
tests/test_errors.py
Normal file
21
tests/test_errors.py
Normal file
@@ -0,0 +1,21 @@
|
||||
"""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)
|
||||
Reference in New Issue
Block a user