Skip to content

Commit 5b8a09a

Browse files
committed
skip test_docs_general_functions_present
only test documentation in documentation building CI
1 parent 0cd95e5 commit 5b8a09a

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

tests/test_documentation_build.py

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,29 @@
11
"""Tests for documentation build."""
22

3-
import os
3+
import sys
44

5+
import pytest
56

7+
try:
8+
import mkdocs
9+
except ImportError:
10+
...
11+
12+
13+
@pytest.mark.skipif(
14+
"mkdocs" not in sys.modules,
15+
reason=(
16+
"Requires the MkDocs library. "
17+
"And only test documentation in documentation building CI."
18+
),
19+
)
620
def test_docs_general_functions_present():
721
"""Test that all docs pages build correctly.
822
923
TODO: There has to be a better way to automatically check that
1024
all of the functions are present in the docs.
1125
This is an awesome thing that we could use help with in the future.
1226
"""
13-
# Build docs using mkdocs
14-
os.system("mkdocs build --clean")
1527

1628
# We want to check that the following keywords are all present.
1729
# I put in a subsample of general functions.

0 commit comments

Comments
 (0)