-
-
Notifications
You must be signed in to change notification settings - Fork 53
Expand file tree
/
Copy pathtest_themes.py
More file actions
39 lines (32 loc) · 1016 Bytes
/
Copy pathtest_themes.py
File metadata and controls
39 lines (32 loc) · 1016 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
"""Tests for the different themes we claim to support."""
from __future__ import annotations
from typing import TYPE_CHECKING
import pytest
if TYPE_CHECKING:
from mkdocstrings_handlers.python import PythonHandler
@pytest.mark.parametrize(
"plugin",
[
{"theme": "mkdocs"},
{"theme": "readthedocs"},
{"theme": {"name": "material"}},
],
indirect=["plugin"],
)
@pytest.mark.parametrize(
"identifier",
[
"mkdocstrings_handlers.python._internal.config",
"mkdocstrings_handlers.python._internal.handler",
"mkdocstrings_handlers.python._internal.rendering",
],
)
def test_render_themes_templates_python(identifier: str, handler: PythonHandler) -> None:
"""Test rendering of a given theme's templates.
Parameters:
identifier: Parametrized identifier.
handler: Python handler (fixture).
"""
options = handler.get_options({})
data = handler.collect(identifier, options)
handler.render(data, options)