MCPcopy Index your code
hub / github.com/huggingface/diffusers / get_all_tests

Function get_all_tests

utils/tests_fetcher.py:165–180  ·  view source on GitHub ↗

Walks the `tests` folder to return a list of files/subfolders. This is used to split the tests to run when using parallelism. The split is: - folders under `tests`: (`tokenization`, `pipelines`, etc) except the subfolder `models` is excluded. - folders under `tests/models`: `bert`,

()

Source from the content-addressed store, hash-verified

163
164
165def get_all_tests() -> List[str]:
166 """
167 Walks the `tests` folder to return a list of files/subfolders. This is used to split the tests to run when using
168 parallelism. The split is:
169
170 - folders under `tests`: (`tokenization`, `pipelines`, etc) except the subfolder `models` is excluded.
171 - folders under `tests/models`: `bert`, `gpt2`, etc.
172 - test files under `tests`: `test_modeling_common.py`, `test_tokenization_common.py`, etc.
173 """
174
175 # test folders/files directly under `tests` folder
176 tests = os.listdir(PATH_TO_TESTS)
177 tests = [f"tests/{f}" for f in tests if "__pycache__" not in f]
178 tests = sorted([f for f in tests if (PATH_TO_REPO / f).is_dir() or f.startswith("tests/test_")])
179
180 return tests
181
182
183def diff_is_docstring_only(repo: Repo, branching_point: str, filename: str) -> bool:

Callers 2

infer_tests_to_runFunction · 0.85
tests_fetcher.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…