Add some tests for check_dummies (#19146)

This commit is contained in:
Sylvain Gugger
2022-09-21 14:54:09 -04:00
committed by GitHub
parent d5848a574a
commit 3c7b965bcd
4 changed files with 131 additions and 3 deletions

View File

@@ -437,7 +437,7 @@ def module_to_test_file(module_fname):
return ["tests/onnx/test_features.py", "tests/onnx/test_onnx.py", "tests/onnx/test_onnx_v2.py"]
# Special case for utils (not the one in src/transformers, the ones at the root of the repo).
elif len(splits) > 0 and splits[0] == "utils":
default_test_file = f"tests/utils/test_utils_{module_name}"
default_test_file = f"tests/repo_utils/test_{module_name}"
elif len(splits) > 4 and splits[2] == "models":
default_test_file = f"tests/models/{splits[3]}/test_{module_name}"
elif len(splits) > 2 and splits[2].startswith("generation"):