Coverage for tests/test_docstrings/conftest.py: 100.00%
14 statements
« prev ^ index » next coverage.py v7.6.1, created at 2024-08-15 16:47 +0200
« prev ^ index » next coverage.py v7.6.1, created at 2024-08-15 16:47 +0200
1"""Pytest fixture for docstrings tests."""
3from __future__ import annotations
5from typing import Iterator
7import pytest
9from _griffe.docstrings import google, numpy, sphinx
10from tests.test_docstrings.helpers import ParserType, parser
13@pytest.fixture
14def parse_google() -> Iterator[ParserType]:
15 """Yield a function to parse Google docstrings.
17 Yields:
18 A parser function.
19 """
20 yield from parser(google)
23@pytest.fixture
24def parse_numpy() -> Iterator[ParserType]:
25 """Yield a function to parse Numpy docstrings.
27 Yields:
28 A parser function.
29 """
30 yield from parser(numpy)
33@pytest.fixture
34def parse_sphinx() -> Iterator[ParserType]:
35 """Yield a function to parse Sphinx docstrings.
37 Yields:
38 A parser function.
39 """
40 yield from parser(sphinx)