Use combinations to test eager/graph mode and TF v1/v2 for enumerate_test.py
PiperOrigin-RevId: 261712325
This commit is contained in:
parent
5e08111d7c
commit
a779f73def
@ -17,18 +17,20 @@ from __future__ import absolute_import
|
|||||||
from __future__ import division
|
from __future__ import division
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
|
from absl.testing import parameterized
|
||||||
|
|
||||||
from tensorflow.python.data.kernel_tests import test_base
|
from tensorflow.python.data.kernel_tests import test_base
|
||||||
from tensorflow.python.data.ops import dataset_ops
|
from tensorflow.python.data.ops import dataset_ops
|
||||||
|
from tensorflow.python.framework import combinations
|
||||||
from tensorflow.python.framework import constant_op
|
from tensorflow.python.framework import constant_op
|
||||||
from tensorflow.python.framework import dtypes
|
from tensorflow.python.framework import dtypes
|
||||||
from tensorflow.python.framework import tensor_shape
|
from tensorflow.python.framework import tensor_shape
|
||||||
from tensorflow.python.framework import test_util
|
|
||||||
from tensorflow.python.platform import test
|
from tensorflow.python.platform import test
|
||||||
|
|
||||||
|
|
||||||
@test_util.run_all_in_graph_and_eager_modes
|
class EnumerateTest(test_base.DatasetTestBase, parameterized.TestCase):
|
||||||
class EnumerateTest(test_base.DatasetTestBase):
|
|
||||||
|
|
||||||
|
@combinations.generate(test_base.default_test_combinations())
|
||||||
def testEnumerate(self):
|
def testEnumerate(self):
|
||||||
components = (["a", "b"], [1, 2], [37.0, 38])
|
components = (["a", "b"], [1, 2], [37.0, 38])
|
||||||
start = constant_op.constant(20, dtype=dtypes.int64)
|
start = constant_op.constant(20, dtype=dtypes.int64)
|
||||||
|
Loading…
Reference in New Issue
Block a user