From 1f9e862507704774334dc22a84724e74f52232b7 Mon Sep 17 00:00:00 2001 From: Yih-Dar <2521628+ydshieh@users.noreply.github.com> Date: Thu, 28 Apr 2022 15:31:57 +0200 Subject: [PATCH] Update check_models_are_tested to deal with Windows path (#16973) * fix * Apply suggestions from code review Co-authored-by: ydshieh Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> --- utils/check_repo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/check_repo.py b/utils/check_repo.py index 201f33cb0c..2c8ca66abb 100644 --- a/utils/check_repo.py +++ b/utils/check_repo.py @@ -361,7 +361,7 @@ def check_models_are_tested(module, test_file): defined_models = get_models(module) tested_models = find_tested_models(test_file) if tested_models is None: - if test_file in TEST_FILES_WITH_NO_COMMON_TESTS: + if test_file.replace(os.path.sep, "/") in TEST_FILES_WITH_NO_COMMON_TESTS: return return [ f"{test_file} should define `all_model_classes` to apply common tests to the models it tests. "