"""Shared test fixtures for codeflash-python tests."""

from __future__ import annotations

import sys
from pathlib import Path

import pytest

# Make the code_to_optimize fixture package importable by tests that need it
# (e.g. test_comparator.py, test_trace_benchmarks.py).
_TESTS_DIR = str(Path(__file__).resolve().parent)
if _TESTS_DIR not in sys.path:
    sys.path.insert(0, _TESTS_DIR)


@pytest.fixture
def benchmark():
    """Passthrough benchmark fixture matching the codeflash-benchmark plugin fallback."""
    return lambda func, *args, **kwargs: func(*args, **kwargs)
