Files
shell-history-semantic-search/tests/conftest.py
7000pctAUTO ccf3d6072e
Some checks failed
CI / test (push) Has been cancelled
fix: resolve CI test failures by removing unused imports and updating workflow paths
- Removed unused imports from test files (os, pytest, pathlib.Path, MagicMock, patch, numpy, sqlite3, IndexingService)
- Updated CI workflow to only check shell-history-semantic-search project files instead of all files in shared src/ and tests/ directories
- All 43 tests pass locally
2026-03-22 18:24:44 +00:00

35 lines
678 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",
timestamp=1234567890.0,
score=0.95,
shell="bash"
)
@pytest.fixture
def temp_db(tmp_path):
db_path = tmp_path / "test_history.db"
db = Database(str(db_path))
yield db
db.close()