Initial build out
This commit is contained in:
parent
f037c50736
commit
29215e2bd2
40 changed files with 2622 additions and 0 deletions
21
tests/conftest.py
Normal file
21
tests/conftest.py
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
from pathlib import Path
|
||||
|
||||
import duckdb
|
||||
import pytest
|
||||
|
||||
from admin_analytics.db.schema import ensure_schema
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def db_conn(tmp_path):
|
||||
"""Provide a fresh DuckDB connection with schema initialized."""
|
||||
conn = duckdb.connect(str(tmp_path / "test.duckdb"))
|
||||
ensure_schema(conn)
|
||||
yield conn
|
||||
conn.close()
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def fixtures_dir():
|
||||
"""Return the path to the test fixtures directory."""
|
||||
return Path(__file__).parent / "fixtures"
|
||||
Loading…
Add table
Add a link
Reference in a new issue