Skip to content

Commit 95f10ba

Browse files
committed
Add test for docs directories file
1 parent 6f4d940 commit 95f10ba

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/internal/test_paths_for_docs.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
ROOT = Path(subprocess.getoutput("git rev-parse --show-toplevel")) # noqa: S605
88
PATHS_FOR_DOCS = ROOT / ".internal" / "paths_for_docs.yaml"
9+
DOCS_DIRECTORIES = ROOT / ".internal" / "docs_directories.txt"
910

1011
"""
1112
This test checks if all paths in the files_to_copy_for_docs.yaml file exist.
@@ -26,3 +27,8 @@ def test_paths_to_copy_for_docs():
2627
missing_paths.append(path)
2728

2829
assert not missing_paths, f"The following paths do not exist: {missing_paths}"
30+
31+
32+
def test_docs_directories():
33+
dir_list = DOCS_DIRECTORIES.read_text().splitlines()
34+
assert all((ROOT / path).exists() for path in dir_list), f"Make sure all directories in {DOCS_DIRECTORIES} actually exist"

0 commit comments

Comments
 (0)