File: test_basic.py

package info (click to toggle)
sphinx-sqlalchemy 0.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 160 kB
  • sloc: python: 241; makefile: 7
file content (15 lines) | stat: -rw-r--r-- 516 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
"""Basic tests"""

import os.path
import sys

from sphinx_pytest.plugin import CreateDoctree


def test_basic(sphinx_doctree_no_tr: CreateDoctree, snapshot):
    """Basic test"""
    sys.path.insert(0, os.path.join(os.path.dirname(__file__), "modules"))
    sphinx_doctree_no_tr.set_conf({"extensions": ["sphinx_sqlalchemy"]})
    result = sphinx_doctree_no_tr(".. sqla-model:: module1.TestUser")
    assert not result.warnings
    assert "\n".join([li.rstrip() for li in result.pformat().splitlines()]) == snapshot