File: test_needs_from_toml.py

package info (click to toggle)
sphinx-needs 5.1.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 11,924 kB
  • sloc: python: 21,132; javascript: 187; makefile: 89; sh: 29; xml: 10
file content (26 lines) | stat: -rw-r--r-- 599 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
24
25
26
import json
from pathlib import Path

import pytest
from syrupy.filters import props


@pytest.mark.parametrize(
    "test_app",
    [
        {
            "buildername": "html",
            "srcdir": "doc_test/needs_from_toml",
            "no_plantuml": True,
        }
    ],
    indirect=True,
)
def test_needs_from_toml(test_app, snapshot):
    app = test_app
    app.build()
    assert not app._warning.getvalue()
    data = json.loads(Path(app.outdir, "needs.json").read_text("utf8"))
    assert data == snapshot(
        exclude=props("created", "project", "creator", "needs_schema")
    )