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
5e3b4a70
"docs/vscode:/vscode.git/clone" did not exist on "8017a59091f8949332fc398971dfa4e55604a64c"
Unverified
Commit
5e3b4a70
authored
Sep 27, 2021
by
Sylvain Gugger
Committed by
GitHub
Sep 27, 2021
Browse files
Fix filtering in test fetcher utils (#13766)
parent
11c69b80
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
utils/tests_fetcher.py
utils/tests_fetcher.py
+3
-1
No files found.
utils/tests_fetcher.py
View file @
5e3b4a70
...
@@ -442,8 +442,10 @@ def infer_tests_to_run(output_file, diff_with_last_commit=False, filters=None):
...
@@ -442,8 +442,10 @@ def infer_tests_to_run(output_file, diff_with_last_commit=False, filters=None):
# Make sure we did not end up with a test file that was removed
# Make sure we did not end up with a test file that was removed
test_files_to_run
=
[
f
for
f
in
test_files_to_run
if
os
.
path
.
isfile
(
f
)
or
os
.
path
.
isdir
(
f
)]
test_files_to_run
=
[
f
for
f
in
test_files_to_run
if
os
.
path
.
isfile
(
f
)
or
os
.
path
.
isdir
(
f
)]
if
filters
is
not
None
:
if
filters
is
not
None
:
filtered_files
=
[]
for
filter
in
filters
:
for
filter
in
filters
:
test_files_to_run
=
[
f
for
f
in
test_files_to_run
if
f
.
startswith
(
filter
)]
filtered_files
.
extend
([
f
for
f
in
test_files_to_run
if
f
.
startswith
(
filter
)])
test_files_to_run
=
filtered_files
print
(
f
"
\n
### TEST TO RUN ###
\n
{
_print_list
(
test_files_to_run
)
}
"
)
print
(
f
"
\n
### TEST TO RUN ###
\n
{
_print_list
(
test_files_to_run
)
}
"
)
if
len
(
test_files_to_run
)
>
0
:
if
len
(
test_files_to_run
)
>
0
:
...
...
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