Added unit tests for database, markov, flags, CLI, and version modules.
CI / Formatting (push) Successful in 5s
CI / Linting (push) Successful in 5s
CI / Tests (push) Successful in 9s
CI / Type Checking (push) Failing after 10s
CI / Spelling (push) Successful in 5s

This commit is contained in:
2026-03-17 14:13:31 -04:00
parent 34ae3b3e64
commit 2d13dfb063
8 changed files with 770 additions and 7 deletions
+18
View File
@@ -13,3 +13,21 @@
# limitations under the License.
"""Shared pytest fixtures for the test suite."""
from typing import TYPE_CHECKING
import pytest
from crabstero.database import Database
if TYPE_CHECKING:
from collections.abc import AsyncIterator
from pathlib import Path
@pytest.fixture
async def db(tmp_path: Path) -> AsyncIterator[Database]:
"""Yield a Database backed by a temporary SQLite file."""
database = await Database.connect(str(tmp_path / "test.db"))
yield database
await database.close()