Coverage for tests / unit / security / conftest.py: 78%
9 statements
« prev ^ index » next coverage.py v7.13.0, created at 2026-04-03 18:53 +0000
« prev ^ index » next coverage.py v7.13.0, created at 2026-04-03 18:53 +0000
1"""Fixtures for security tests."""
3from __future__ import annotations
5import tempfile
6from pathlib import Path
7from typing import TYPE_CHECKING
9import pytest
11if TYPE_CHECKING:
12 from collections.abc import Generator
15@pytest.fixture
16def temp_project_dir() -> Generator[Path, None, None]:
17 """Create a temporary directory to simulate a project root.
19 Yields:
20 Path: Path to the temporary directory.
21 """
22 with tempfile.TemporaryDirectory() as tmpdir:
23 yield Path(tmpdir)