@@ -81,12 +81,12 @@ def test_basic_working(tmp_path, mkdocs_file: str) -> None:
8181 See https://github.com/timvink/mkdocs-git-authors-plugin/issues/60
8282 """
8383 result = build_docs_setup (f"tests/basic_setup/{ mkdocs_file } " , tmp_path )
84- assert result . exit_code == 0 , (
85- "'mkdocs build' command failed. Error: %s" % result . stdout
86- )
84+ assert (
85+ result . exit_code == 0
86+ ), f"'mkdocs build' command failed. Error: { result . stdout } "
8787
8888 index_file = tmp_path / "index.html"
89- assert index_file .exists (), "%s does not exist" % index_file
89+ assert index_file .exists (), f" { index_file } does not exist"
9090
9191 contents = index_file .read_text ()
9292 assert re .search ("<span class='git-page-authors" , contents )
@@ -96,12 +96,12 @@ def test_basic_working(tmp_path, mkdocs_file: str) -> None:
9696def test_custom_href (tmp_path ) -> None :
9797 """ """
9898 result = build_docs_setup ("tests/basic_setup/mkdocs_custom_href.yml" , tmp_path )
99- assert result . exit_code == 0 , (
100- "'mkdocs build' command failed. Error: %s" % result . stdout
101- )
99+ assert (
100+ result . exit_code == 0
101+ ), f"'mkdocs build' command failed. Error: { result . stdout } "
102102
103103 index_file = tmp_path / "index.html"
104- assert index_file .exists (), "%s does not exist" % index_file
104+ assert index_file .exists (), f" { index_file } does not exist"
105105
106106 contents = index_file .read_text ()
107107 assert re .search ("<span class='git-page-authors" , contents )
@@ -121,12 +121,12 @@ def test_custom_href(tmp_path) -> None:
121121
122122def test_no_email (tmp_path ) -> None :
123123 result = build_docs_setup ("tests/basic_setup/mkdocs_no_email.yml" , tmp_path )
124- assert result . exit_code == 0 , (
125- "'mkdocs build' command failed. Error: %s" % result . stdout
126- )
124+ assert (
125+ result . exit_code == 0
126+ ), f"'mkdocs build' command failed. Error: { result . stdout } "
127127
128128 index_file = tmp_path / "index.html"
129- assert index_file .exists (), "%s does not exist" % index_file
129+ assert index_file .exists (), f" { index_file } does not exist"
130130
131131 contents = index_file .read_text ()
132132 assert re .search ("<span class='git-page-authors" , contents )
@@ -135,25 +135,25 @@ def test_no_email(tmp_path) -> None:
135135
136136def test_exclude_working (tmp_path ) -> None :
137137 result = build_docs_setup ("tests/basic_setup/mkdocs_exclude.yml" , tmp_path )
138- assert result . exit_code == 0 , (
139- "'mkdocs build' command failed. Error: %s" % result . stdout
140- )
138+ assert (
139+ result . exit_code == 0
140+ ), f"'mkdocs build' command failed. Error: { result . stdout } "
141141
142142 page_file = tmp_path / "page_with_tag/index.html"
143- assert page_file .exists (), "%s does not exist" % page_file
143+ assert page_file .exists (), f" { page_file } does not exist"
144144
145145 contents = page_file .read_text ()
146146 assert not re .search ("<span class='git-page-authors" , contents )
147147
148148
149149def test_ignore_authors_working (tmp_path ) -> None :
150150 result = build_docs_setup ("tests/basic_setup/mkdocs_ignore_authors.yml" , tmp_path )
151- assert result . exit_code == 0 , (
152- "'mkdocs build' command failed. Error: %s" % result . stdout
153- )
151+ assert (
152+ result . exit_code == 0
153+ ), f"'mkdocs build' command failed. Error: { result . stdout } "
154154
155155 page_file = tmp_path / "page_with_tag/index.html"
156- assert page_file .exists (), "%s does not exist" % page_file
156+ assert page_file .exists (), f" { page_file } does not exist"
157157
158158 contents = page_file .read_text ()
159159 assert re .search ("<span class='git-page-authors" , contents )
@@ -197,9 +197,9 @@ def test_exclude_working_with_genfiles(tmp_path) -> None:
197197 result = build_docs_setup (
198198 str (testproject_path / "mkdocs.yml" ), str (testproject_path / "site" )
199199 )
200- assert result . exit_code == 0 , (
201- "'mkdocs build' command failed. Error: %s" % result . stdout
202- )
200+ assert (
201+ result . exit_code == 0
202+ ), f"'mkdocs build' command failed. Error: { result . stdout } "
203203
204204 # files generated ourselves right before build but not committed, should not generate warnings
205205 assert "manually_created.md has not been committed yet." not in result .stdout
@@ -213,12 +213,12 @@ def test_enabled_working(tmp_path) -> None:
213213 result = build_docs_setup (
214214 "tests/basic_setup/mkdocs_complete_material_disabled.yml" , tmp_path
215215 )
216- assert result . exit_code == 0 , (
217- "'mkdocs build' command failed. Error: %s" % result . stdout
218- )
216+ assert (
217+ result . exit_code == 0
218+ ), f"'mkdocs build' command failed. Error: { result . stdout } "
219219
220220 page_file = tmp_path / "page_with_tag/index.html"
221- assert page_file .exists (), "%s does not exist" % page_file
221+ assert page_file .exists (), f" { page_file } does not exist"
222222
223223 contents = page_file .read_text ()
224224 assert not re .search ("<span class='git-page-authors" , contents )
@@ -249,9 +249,9 @@ def test_project_with_no_commits(tmp_path) -> None:
249249 result = build_docs_setup (
250250 str (testproject_path / "website/mkdocs.yml" ), str (testproject_path / "site" )
251251 )
252- assert result . exit_code == 0 , (
253- "'mkdocs build' command failed. Error: %s" % result . stdout
254- )
252+ assert (
253+ result . exit_code == 0
254+ ), f"'mkdocs build' command failed. Error: { result . stdout } "
255255
256256
257257def test_building_empty_site (tmp_path ) -> None :
@@ -282,9 +282,9 @@ def test_building_empty_site(tmp_path) -> None:
282282 result = build_docs_setup (
283283 str (testproject_path / "website/mkdocs.yml" ), str (testproject_path / "site" )
284284 )
285- assert result . exit_code == 0 , (
286- "'mkdocs build' command failed. Error: %s" % result . stdout
287- )
285+ assert (
286+ result . exit_code == 0
287+ ), f"'mkdocs build' command failed. Error: { result . stdout } "
288288
289289
290290def test_fallback (tmp_path ) -> None :
@@ -313,6 +313,6 @@ def test_fallback(tmp_path) -> None:
313313 str (testproject_path / "website/mkdocs.yml" ), str (testproject_path / "site" )
314314 )
315315 # import pdb; pdb.set_trace()
316- assert result . exit_code == 0 , (
317- "'mkdocs build' command failed. Error: %s" % result . stdout
318- )
316+ assert (
317+ result . exit_code == 0
318+ ), f"'mkdocs build' command failed. Error: { result . stdout } "
0 commit comments