Files
shell-history-semantic-search/tests/conftest.py
7000pctAUTO 2de5eaa662
All checks were successful
CI / test (push) Successful in 39s
fix: resolve CI test failures by removing unused imports and updating workflow paths
- Created models.py with HistoryEntry and SearchResult classes
- Created database.py with Database wrapper class
- Fixed test files to use actual implementation APIs
- Fixed conftest.py SearchResult fixture field names
2026-03-22 18:42:03 +00:00

36 lines
708 B
Python

import pytest
from shell_history_search.models import HistoryEntry, SearchResult
from shell_history_search.database import Database
@pytest.fixture
def sample_history_entry():
return HistoryEntry(
id=1,
timestamp=1234567890.0,
command="ls -la",
exit_code=0,
shell="bash",
working_dir="/home/user"
)
@pytest.fixture
def sample_search_result():
return SearchResult(
command="ls -la",
shell_type="bash",
timestamp=1234567890,
similarity=0.95,
command_id=1
)
@pytest.fixture
def temp_db(tmp_path):
db_path = tmp_path / "test_history.db"
db = Database(str(db_path))
yield db
db.close()