File tree Expand file tree Collapse file tree 3 files changed +8
-10
lines changed Expand file tree Collapse file tree 3 files changed +8
-10
lines changed Original file line number Diff line number Diff line change 36
36
path : site/
37
37
38
38
- name : Test built result
39
- run : pytest .\tests\test_documentation_build.py
39
+ run : pytest -m "documentation"
40
40
41
41
- name : Deploy docs preview to Netlify
42
42
Original file line number Diff line number Diff line change @@ -12,4 +12,5 @@ markers =
12
12
spark_functions: tests for pyspark functions
13
13
xarray: tests for xarray functions
14
14
timeseries: tests for timeseries
15
+ documentation: tests for documentation
15
16
turtle: tests that take more than 5 seconds to execute
Original file line number Diff line number Diff line change 2
2
3
3
import pytest
4
4
5
- try :
6
- import mkdocs
7
5
8
- # Even if 'mkdocs' is installed
9
- # 'mkdocs' is could be imported as <module 'mkdocs' (namespace)>
10
- # Need to check if 'mkdocs' has '__version__' attribute
11
-
12
- mkdocs_installed = hasattr (mkdocs , "__version__" )
13
- except (ImportError , AttributeError ):
14
- mkdocs_installed = False
6
+ # Even if 'mkdocs' is installed
7
+ # 'mkdocs' is could be imported as <module 'mkdocs' (namespace)>
8
+ # Need to check if 'mkdocs' has '__version__' attribute
9
+ mkdocs = pytest .importorskip ("mkdocs" )
10
+ mkdocs_installed = hasattr (mkdocs , "__version__" )
15
11
16
12
17
13
@pytest .mark .skipif (
21
17
"And only test documentation in documentation building CI."
22
18
),
23
19
)
20
+ @pytest .mark .documentation
24
21
def test_docs_general_functions_present ():
25
22
"""Test that all docs pages build correctly.
26
23
You can’t perform that action at this time.
0 commit comments