Skip to content

Commit

Permalink
Run doctest for new files (huggingface#25588)
Browse files Browse the repository at this point in the history
fix

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
  • Loading branch information
ydshieh and ydshieh authored Aug 21, 2023
1 parent 9627c3d commit f09db47
Show file tree
Hide file tree
Showing 3 changed files with 998 additions and 8 deletions.
4 changes: 2 additions & 2 deletions utils/check_doctest_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
# All paths are set with the intent you should run this script from the root of the repo with the command
# python utils/check_doctest_list.py
REPO_PATH = "."
DOCTEST_FILE_PATHS = ["documentation_tests.txt", "slow_documentation_tests.txt"]
DOCTEST_FILE_PATHS = ["not_doctested.txt", "slow_documentation_tests.txt"]


def clean_doctest_list(doctest_file: str, overwrite: bool = False):
Expand All @@ -62,7 +62,7 @@ def clean_doctest_list(doctest_file: str, overwrite: bool = False):

if len(non_existent_paths) > 0:
non_existent_paths = "\n".join([f"- {f}" for f in non_existent_paths])
raise ValueError(f"`utils/documentation_tests.txt` contains non-existent paths:\n{non_existent_paths}")
raise ValueError(f"`{doctest_file}` contains non-existent paths:\n{non_existent_paths}")

sorted_paths = sorted(all_paths)
if all_paths != sorted_paths:
Expand Down
Loading

0 comments on commit f09db47

Please sign in to comment.