snipe/tests/conftest.py
pyr0ball ad687fabfd
Some checks are pending
CI / Python tests (push) Waiting to run
CI / Frontend typecheck + tests (push) Waiting to run
Mirror / mirror (push) Waiting to run
fix(lint): auto-fix import sorting and unused imports across remaining files
ruff auto-fix pass: I001 import ordering and F401 unused imports across
pg_shared.py, mercari/adapter.py, scheduler.py, and test files.
2026-07-06 02:52:38 -07:00

18 lines
410 B
Python

import os
import pytest
def pytest_configure(config):
config.addinivalue_line(
"markers",
"postgres: mark test as requiring a live Postgres instance (SNIPE_SHARED_DB_URL must be set)",
)
@pytest.fixture
def postgres_dsn():
dsn = os.environ.get("SNIPE_SHARED_DB_URL")
if not dsn:
pytest.skip("SNIPE_SHARED_DB_URL not set — skipping Postgres tests")
return dsn