More fixes for doctest (#30265)

* fix

* update

* update

* fix

---------

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
Yih-Dar
2024-04-16 11:58:55 +02:00
committed by GitHub
parent 51bcadc10a
commit cbc2cc187a
17 changed files with 65 additions and 32 deletions

View File

@@ -506,6 +506,8 @@ def get_all_doctest_files() -> List[str]:
test_files_to_run = py_files + md_files
# change to use "/" as path separator
test_files_to_run = ["/".join(Path(x).parts) for x in test_files_to_run]
# don't run doctest for files in `src/transformers/models/deprecated`
test_files_to_run = [x for x in test_files_to_run if "models/deprecated" not in test_files_to_run]
# only include files in `src` or `docs/source/en/`
test_files_to_run = [x for x in test_files_to_run if x.startswith(("src/", "docs/source/en/"))]