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
eaa6b9af
Commit
eaa6b9af
authored
Jan 14, 2020
by
Lysandre
Committed by
Lysandre Debut
Jan 23, 2020
Browse files
Require Torch when testing examples
parent
9bab9b83
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
tests/test_examples.py
tests/test_examples.py
+2
-0
No files found.
tests/test_examples.py
View file @
eaa6b9af
...
...
@@ -15,6 +15,7 @@
import
os
import
unittest
from
.utils
import
require_torch
def
get_examples_from_file
(
file
):
...
...
@@ -40,6 +41,7 @@ def get_examples_from_file(file):
return
[
'
\n
'
.
join
(
example
)
for
example
in
examples
]
@
require_torch
class
TestCodeExamples
(
unittest
.
TestCase
):
def
test_configuration_examples
(
self
):
transformers_directory
=
"../src/transformers"
...
...
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