Skip to content

Properly get tests deps in test_fetcher#17870

Merged
sgugger merged 2 commits intomainfrom
test_deps
Jun 24, 2022
Merged

Properly get tests deps in test_fetcher#17870
sgugger merged 2 commits intomainfrom
test_deps

Conversation

@sgugger
Copy link
Copy Markdown
Collaborator

@sgugger sgugger commented Jun 24, 2022

What does this PR do?

With the move of the tests, the test fetcher is now improperly converting relative imports from other tests to the corresponding test files. This PR fixes that problem.

@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

HuggingFaceDocBuilderDev commented Jun 24, 2022

The documentation is not available anymore as the PR was closed or merged.

return os.path.join(directory, f"{relative_import.replace('.', os.path.sep)}.py")

dependencies = [_convert_relative_import_to_file(relative_import) for relative_import in relative_imports]
print(dependencies)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to keep the print here?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops

@sgugger sgugger merged commit e8eb699 into main Jun 24, 2022
@sgugger sgugger deleted the test_deps branch June 24, 2022 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants