Coverage for tests / unit / tools / semgrep / conftest.py: 100%
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"""Pytest configuration for semgrep tests."""
3from __future__ import annotations
5from collections.abc import Generator
6from unittest.mock import patch
8import pytest
10from lintro.tools.definitions.semgrep import SemgrepPlugin
13@pytest.fixture
14def semgrep_plugin() -> Generator[SemgrepPlugin, None, None]:
15 """Provide a SemgrepPlugin instance for testing.
17 Yields:
18 SemgrepPlugin: A SemgrepPlugin instance with version checks bypassed.
19 """
20 with patch(
21 "lintro.plugins.execution_preparation.verify_tool_version",
22 return_value=None,
23 ):
24 yield SemgrepPlugin()