"""Pytest configuration and fixtures.

Generated by pypreset augment.
"""

from pathlib import Path
from typing import Generator

import pytest


@pytest.fixture
def project_root() -> Path:
    """Return the project root directory."""
    return Path(__file__).parent.parent


@pytest.fixture
def tmp_path_with_files(tmp_path: Path) -> Generator[Path, None, None]:
    """Provide a temporary directory with common test files.

    This fixture creates a temporary directory that is automatically
    cleaned up after the test completes.
    """
    # Create common directories
    (tmp_path / "data").mkdir()
    (tmp_path / "output").mkdir()

    yield tmp_path

    # Cleanup is automatic with tmp_path


{% if has_src_layout %}
@pytest.fixture
def package_path(project_root: Path) -> Path:
    """Return the path to the main package."""
    return project_root / "src" / "{{ project.package_name }}"
{% endif %}


# Add your custom fixtures below
# ------------------------------------------------------------------
