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
|