File: test_rewrites.py

package info (click to toggle)
mkdocs-section-index 0.3.11-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 260 kB
  • sloc: python: 486; makefile: 2
file content (23 lines) | stat: -rw-r--r-- 872 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import pytest

from mkdocs_section_index import rewrites


@pytest.mark.golden_test("rewrites/mkdocs-sitemap-*.yml")
def test_rewrite_mkdocs_sitemap(golden):
    assert rewrites._transform_mkdocs_sitemap_template(golden["input"]) == golden.out["output"]


@pytest.mark.golden_test("rewrites/readthedocs-base-*.yml")
def test_rewrite_readthedocs_base(golden):
    assert rewrites._transform_readthedocs_base_template(golden["input"]) == golden.out["output"]


@pytest.mark.golden_test("rewrites/material-nav-item-*.yml")
def test_rewrite_material_nav_item(golden):
    assert rewrites._transform_material_nav_item_template(golden["input"]) == golden.out["output"]


@pytest.mark.golden_test("rewrites/material-tabs-item-*.yml")
def test_rewrite_material_tabs_item(golden):
    assert rewrites._transform_material_tabs_item_template(golden["input"]) == golden.out["output"]