mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-31 02:02:21 +06:00
Require Torch when testing examples
This commit is contained in:
parent
9bab9b83d2
commit
eaa6b9afc6
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user