File: test_docs.py

package info (click to toggle)
python-npe2 0.7.8-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 828 kB
  • sloc: python: 7,088; makefile: 19
file content (23 lines) | stat: -rw-r--r-- 515 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import sys
from pathlib import Path

import pytest

from npe2 import PluginManifest

DOCS_DIR = Path(__file__).parent.parent / "_docs"


def test_example_manifest():
    example = DOCS_DIR / "example_manifest.yaml"
    assert PluginManifest.from_file(example)


@pytest.mark.github_main_only
def test_render_docs(tmp_path, monkeypatch):
    sys.path.append(str(DOCS_DIR.parent))
    from _docs.render import main

    assert not list(tmp_path.glob("*.md"))
    main(tmp_path)
    assert list(tmp_path.glob("*.md"))