fix(tui): resolve format, AmbiguousStep, and coverage gaps in session persistence
- Apply ruff format to store.py (split multi-arg conn.execute calls) and
steps file (collapse single-arg execute to one line)
- Fix AmbiguousStep: add literal quotes to @given/@then patterns so
'a session with id "{session_id}"' is unambiguous vs the
'in the database' variant; update all dependent then-steps consistently
- Mark if TYPE_CHECKING block with # pragma: no cover (never executed)
- Add scenario + step for default db_path to cover store.py lines 32-34
(uses unittest.mock.patch on Path.home to avoid touching real homedir)
ISSUES CLOSED: #10648
This commit is contained in:
@@ -45,3 +45,7 @@ Feature: TUI Session Persistence
|
||||
And I create a new session store instance
|
||||
Then the active session is "last-session"
|
||||
And the session data is restored correctly
|
||||
|
||||
Scenario: Store uses default database path when none is specified
|
||||
Given the TUI session store is created with default database path
|
||||
Then the SQLite database file exists at ~/.local/state/cleveragents/tui.db
|
||||
|
||||
Reference in New Issue
Block a user