Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
a81fd355
"tests/test_modeling_tf_convbert.py" did not exist on "a573777901e662ec2e565be312ffaeedef6effec"
Unverified
Commit
a81fd355
authored
Jan 27, 2022
by
Sylvain Gugger
Committed by
GitHub
Jan 27, 2022
Browse files
Fix tests_fetcher (#15376)
parent
eab33810
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
utils/tests_fetcher.py
utils/tests_fetcher.py
+4
-1
No files found.
utils/tests_fetcher.py
View file @
a81fd355
...
...
@@ -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
():
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment