File: test_site.py

package info (click to toggle)
mkdocs-macros-plugin 1.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 372 kB
  • sloc: python: 1,336; makefile: 4
file content (29 lines) | stat: -rw-r--r-- 518 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
27
28
29
"""
Testing the project

(C) Laurent Franceschetti 2024
"""


import pytest

from mkdocs_test import DocProject





def test_build():
    project = DocProject(".")
    # did not fail

    print("building website...")
    build_result = project.build(strict=True)
    result = build_result.stderr
    print("Result:", result)
    # fails, declaring that the pluglet exists and must be installed.
    assert build_result.returncode != 0 # failure 
    assert "pluglet" in result
    assert "pip install" in result