"...git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "8d3bb781ee2643ad1076f4cbcc6f417245671e94"
Commit 0cb16386 authored by Aymeric Augustin's avatar Aymeric Augustin Committed by Julien Chaumond
Browse files

Remove pytest dependency. (#2093)

parent 2670b0d6
...@@ -3,18 +3,19 @@ from __future__ import division ...@@ -3,18 +3,19 @@ from __future__ import division
from __future__ import print_function from __future__ import print_function
import unittest import unittest
import pytest
from transformers import is_tf_available from transformers import is_tf_available
from .utils import require_tf
if is_tf_available(): if is_tf_available():
import tensorflow as tf import tensorflow as tf
from tensorflow.python.eager import context from tensorflow.python.eager import context
from tensorflow.python.framework import ops from tensorflow.python.framework import ops
from transformers import (create_optimizer, GradientAccumulator) from transformers import (create_optimizer, GradientAccumulator)
else:
pytestmark = pytest.mark.skip("Require TensorFlow")
@require_tf
class OptimizationFTest(unittest.TestCase): class OptimizationFTest(unittest.TestCase):
def assertListAlmostEqual(self, list1, list2, tol): def assertListAlmostEqual(self, list1, list2, tol):
self.assertEqual(len(list1), len(list2)) self.assertEqual(len(list1), len(list2))
......
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