- Add PLAN.md with 40-step checklist across 10 phases - Add CLAUDE.md with project-specific instructions - Set up nix flake with FastHTML/MonsterUI dependencies - Create Python package skeleton (src/animaltrack) - Vendor FastHTML and MonsterUI documentation - Add Docker build configuration 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
23 lines
667 B
Python
23 lines
667 B
Python
# ABOUTME: Pytest configuration and fixtures for AnimalTrack tests.
|
|
# ABOUTME: Provides database fixtures, test clients, and common utilities.
|
|
|
|
import pytest
|
|
import tempfile
|
|
import os
|
|
|
|
|
|
@pytest.fixture
|
|
def temp_db_path():
|
|
"""Create a temporary database file path for testing."""
|
|
with tempfile.NamedTemporaryFile(suffix=".db", delete=False) as f:
|
|
db_path = f.name
|
|
yield db_path
|
|
# Cleanup
|
|
if os.path.exists(db_path):
|
|
os.unlink(db_path)
|
|
# Also clean up WAL files if they exist
|
|
for suffix in ["-shm", "-wal", "-journal"]:
|
|
wal_path = db_path + suffix
|
|
if os.path.exists(wal_path):
|
|
os.unlink(wal_path)
|