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`,
()
| 163 | |
| 164 | |
| 165 | def 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 | |
| 183 | def diff_is_docstring_only(repo: Repo, branching_point: str, filename: str) -> bool: |
no outgoing calls
no test coverage detected
searching dependent graphs…