Unverified Commit 1f9e8625 authored by Yih-Dar's avatar Yih-Dar Committed by GitHub
Browse files

Update check_models_are_tested to deal with Windows path (#16973)



* fix

* Apply suggestions from code review
Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
parent dced2624
...@@ -361,7 +361,7 @@ def check_models_are_tested(module, test_file): ...@@ -361,7 +361,7 @@ def check_models_are_tested(module, test_file):
defined_models = get_models(module) defined_models = get_models(module)
tested_models = find_tested_models(test_file) tested_models = find_tested_models(test_file)
if tested_models is None: 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
return [ return [
f"{test_file} should define `all_model_classes` to apply common tests to the models it tests. " f"{test_file} should define `all_model_classes` to apply common tests to the models it tests. "
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment