@@ -67,22 +67,22 @@ def setup_commit_history(testproject_path):
67
67
68
68
repo = git .Repo .init (testproject_path , bare = False )
69
69
author = "Test Person <[email protected] >"
70
-
70
+
71
71
# Change the working directory
72
72
cwd = os .getcwd ()
73
73
os .chdir (testproject_path )
74
-
74
+
75
75
try :
76
76
repo .git .add ('mkdocs.yml' )
77
77
repo .git .commit (message = 'add mkdocs' , author = author )
78
78
repo .git .add ('docs/first_page.md' )
79
- repo .git .commit (message = 'first page' , author = author )
79
+ repo .git .commit (message = 'first page' , author = author )
80
80
repo .git .add ('docs/second_page.md' )
81
81
repo .git .commit (message = 'second page' , author = author )
82
82
repo .git .add ('docs/index.md' )
83
83
repo .git .commit (message = 'homepage' , author = author )
84
84
repo .git .add ('docs/page_with_tag.md' )
85
- repo .git .commit (message = 'homepage' , author = author )
85
+ repo .git .commit (message = 'homepage' , author = author )
86
86
os .chdir (cwd )
87
87
except :
88
88
os .chdir (cwd )
@@ -180,11 +180,15 @@ def test_missing_git_repo(tmp_path):
180
180
result = build_docs_setup (testproject_path )
181
181
assert result .exit_code == 1 , "'mkdocs build' command succeeded while there is no GIT repo"
182
182
183
- def test_basic_locale_builds (tmp_path ):
183
+ def test_build_no_options (tmp_path ):
184
184
# Enable plugin with no extra options set
185
185
validate_mkdocs_file (tmp_path , 'tests/basic_setup/mkdocs.yml' )
186
+
187
+ def test_build_locale_plugin (tmp_path ):
186
188
# Enable plugin with plugin locale set to 'nl'
187
189
validate_mkdocs_file (tmp_path , 'tests/basic_setup/mkdocs_plugin_locale.yml' )
190
+
191
+ def test_build_locale_mkdocs (tmp_path ):
188
192
# Enable plugin with mkdocs locale set to 'nl'
189
193
validate_mkdocs_file (tmp_path , 'tests/basic_setup/mkdocs_locale.yml' )
190
194
@@ -203,27 +207,24 @@ def test_material_theme(tmp_path):
203
207
contents = index_file .read_text ()
204
208
assert re .search (r"Letztes Update\:\s[\w].+" , contents )
205
209
206
- def test_type_builds (tmp_path ):
207
- """
208
- Test the different 'type' parameters
209
- """
210
-
210
+ def test_type_timeago (tmp_path ):
211
211
# type: 'timeago'
212
212
testproject_path = validate_mkdocs_file (
213
213
tmp_path ,
214
214
'tests/basic_setup/mkdocs_timeago.yml' )
215
215
216
+ def test_type_datetime (tmp_path ):
216
217
# type: 'datetime'
217
218
testproject_path = validate_mkdocs_file (
218
219
tmp_path ,
219
220
'tests/basic_setup/mkdocs_datetime.yml' )
220
221
222
+ def test_type_unknown (tmp_path ):
221
223
with pytest .raises (AssertionError ):
222
224
testproject_path = validate_mkdocs_file (
223
225
tmp_path ,
224
226
'tests/basic_setup/mkdocs_unknown_type.yml' )
225
-
226
-
227
+
227
228
def test_low_fetch_depth (tmp_path ):
228
229
"""
229
230
On gitlab and github runners, a GIT might have a low fetch
0 commit comments