Commit eaa6b9af authored by Lysandre's avatar Lysandre Committed by Lysandre Debut
Browse files

Require Torch when testing examples

parent 9bab9b83
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
import os import os
import unittest import unittest
from .utils import require_torch
def get_examples_from_file(file): def get_examples_from_file(file):
...@@ -40,6 +41,7 @@ def get_examples_from_file(file): ...@@ -40,6 +41,7 @@ def get_examples_from_file(file):
return ['\n'.join(example) for example in examples] return ['\n'.join(example) for example in examples]
@require_torch
class TestCodeExamples(unittest.TestCase): class TestCodeExamples(unittest.TestCase):
def test_configuration_examples(self): def test_configuration_examples(self):
transformers_directory = "../src/transformers" transformers_directory = "../src/transformers"
......
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