Tim Vink.*<\/p>"), contents)
+ assert re.search(
+ r"Page authors:.*Tim Vink.*
",
+ contents,
+ )
# Checking Site Authors
- assert re.search(('Tim Vink<\/li>'), contents)
-
-
+ assert re.search(
+ r'Tim Vink',
+ contents,
+ )
-def test_no_email(tmp_path):
+def test_no_email(tmp_path) -> None:
result = build_docs_setup("tests/basic_setup/mkdocs_no_email.yml", tmp_path)
assert result.exit_code == 0, (
"'mkdocs build' command failed. Error: %s" % result.stdout
@@ -130,9 +136,7 @@ def test_no_email(tmp_path):
assert re.search("Tim Vink", contents)
-
-def test_exclude_working(tmp_path):
-
+def test_exclude_working(tmp_path) -> None:
result = build_docs_setup("tests/basic_setup/mkdocs_exclude.yml", tmp_path)
assert result.exit_code == 0, (
"'mkdocs build' command failed. Error: %s" % result.stdout
@@ -145,12 +149,10 @@ def test_exclude_working(tmp_path):
assert not re.search(" None:
"""
A warning for uncommited files should not show up
when those uncommited files are excluded.
"""
-
+
testproject_path = tmp_path / "testproject_genfiles"
- shutil.copytree(
- "tests/basic_setup/docs", str(testproject_path / "docs")
- )
+ shutil.copytree("tests/basic_setup/docs", str(testproject_path / "docs"))
shutil.copyfile(
"tests/basic_setup/mkdocs_genfiles.yml",
str(testproject_path / "mkdocs.yml"),
@@ -202,18 +201,21 @@ def test_exclude_working_with_genfiles(tmp_path):
str(testproject_path / "mkdocs.yml"), str(testproject_path / "site")
)
assert result.exit_code == 0, (
- "'mkdocs build' command failed. Error: %s" % result.stdout
+ "'mkdocs build' command failed. Error: %s" % result.stdout
)
# files generated ourselves right before build but not committed, should not generate warnings
assert "manually_created.md has not been committed yet." not in result.stdout
- assert "manually_created_infolder.md has not been committed yet." not in result.stdout
-
-
+ assert (
+ "manually_created_infolder.md has not been committed yet."
+ not in result.stdout
+ )
-def test_enabled_working(tmp_path):
- result = build_docs_setup("tests/basic_setup/mkdocs_complete_material_disabled.yml", tmp_path)
+def test_enabled_working(tmp_path) -> None:
+ result = build_docs_setup(
+ "tests/basic_setup/mkdocs_complete_material_disabled.yml", tmp_path
+ )
assert result.exit_code == 0, (
"'mkdocs build' command failed. Error: %s" % result.stdout
)
@@ -225,11 +227,10 @@ def test_enabled_working(tmp_path):
assert not re.search("Tim (64.23%), Tom (35.77%)"
-# TODO: test authors threshold with commits
\ No newline at end of file
+
+# TODO: test authors threshold with commits