"tests/test_modeling_tf_convbert.py" did not exist on "a573777901e662ec2e565be312ffaeedef6effec"
Unverified Commit a81fd355 authored by Sylvain Gugger's avatar Sylvain Gugger Committed by GitHub
Browse files

Fix tests_fetcher (#15376)

parent eab33810
......@@ -197,7 +197,10 @@ def get_test_dependencies(test_fname):
# Tests only have relative imports for other test files
relative_imports = re.findall(r"from\s+\.(\S+)\s+import\s+([^\n]+)\n", content)
relative_imports = [test for test, imp in relative_imports if "# tests_ignore" not in imp]
return [os.path.join("tests", f"{test}.py") for test in relative_imports]
dependencies = [os.path.join("tests", f"{test}.py") for test in relative_imports]
# Some tests use docstrings with relative imports in them and this could catch them, so we check the files
# actually exist
return [f for f in dependencies if os.path.isfile(f)]
def create_reverse_dependency_map():
......
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