message: Switch GetSingleElementTest to use TF combinations
diff: @@ -23,25 +23,27 @@ from tensorflow.python.data.experimental.ops import get_single_element
  from tensorflow.python.data.kernel_tests import test_base
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.eager import function
  +from tensorflow.python.framework import combinations
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import sparse_tensor
  -from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import test
  -@test_util.run_all_in_graph_and_eager_modes
  class GetSingleElementTest(test_base.DatasetTestBase, parameterized.TestCase):
  - @parameterized.named_parameters(
  - ("Zero", 0, 1),
  - ("Five", 5, 1),
  - ("Ten", 10, 1),
  - ("Empty", 100, 1, errors.InvalidArgumentError, "Dataset was empty."),
  - ("MoreThanOne", 0, 2, errors.InvalidArgumentError,
  - "Dataset had more than one element."),
  - )
  + @combinations.generate(
  + combinations.times(
  + test_base.default_test_combinations(),
  + combinations.combine(
  + skip=[0, 5, 10], take=[1], error=[None], error_msg=[None]) +
  + combinations.combine(
  + skip=[100], take=[1], error=[errors.InvalidArgumentError],
  + error_msg=["Dataset was empty."]) +
  + combinations.combine(
  + skip=[0], take=[2], error=[errors.InvalidArgumentError],
  + error_msg=["Dataset had more than one element."])))
  def testGetSingleElement(self, skip, take, error=None, error_msg=None):
  def make_sparse(x):
  @@ -62,6 +64,7 @@ class GetSingleElementTest(test_base.DatasetTestBase, parameterized.TestCase):
  with self.assertRaisesRegexp(error, error_msg):
  self.evaluate(get_single_element.get_single_element(dataset))
  + @combinations.generate(test_base.default_test_combinations())
  def testWindow(self):
  """Test that `get_single_element()` can consume a nested dataset."""
  def flat_map_func(ds):
  @@ -73,6 +76,7 @@ class GetSingleElementTest(test_base.DatasetTestBase, parameterized.TestCase):
  self.assertDatasetProduces(
  dataset, [[0, 1], [2, 3], [4, 5], [6, 7], [8, 9]])
  + @combinations.generate(test_base.default_test_combinations())
  def testSideEffect(self):
  counter_var = variables.Variable(0)
  @@ -92,6 +96,7 @@ class GetSingleElementTest(test_base.DatasetTestBase, parameterized.TestCase):
  self.assertEqual(self.evaluate(fn()), b"hello")
  self.assertEqual(self.evaluate(counter_var), 1)
  + @combinations.generate(test_base.default_test_combinations())
  def testAutomaticControlDependencies(self):
  counter_var = variables.Variable(1)
  