message: Use parameterized test case
diff: @@ -17,6 +17,8 @@ from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  +from absl.testing import parameterized
  +
  from tensorflow.python.data.experimental.kernel_tests.serialization import dataset_serialization_test_base
  from tensorflow.python.data.experimental.ops import take_while_ops
  from tensorflow.python.data.ops import dataset_ops
  @@ -24,22 +26,22 @@ from tensorflow.python.platform import test
  class TakeWhileDatasetSerializationTest(
  - dataset_serialization_test_base.DatasetSerializationTestBase):
  + dataset_serialization_test_base.DatasetSerializationTestBase,
  + parameterized.TestCase):
  def _build_dataset(self, num_elements, upper_bound):
  return dataset_ops.Dataset.range(num_elements).apply(
  take_while_ops.take_while(lambda x: x < upper_bound))
  - def testCore(self):
  - def run_test(num_elem1, num_elem2, upper_bound):
  + @parameterized.parameters(
  + (23, 10, 7),
  + (10, 50, 0),
  + (25, 30, 25))
  + def testCore(self, num_elem1, num_elem2, upper_bound):
  self.run_core_tests(lambda: self._build_dataset(num_elem1, upper_bound),
  lambda: self._build_dataset(num_elem2, upper_bound),
  upper_bound)
  - run_test(23, 10, 7)
  - run_test(10, 50, 0)
  - run_test(25, 30, 25)
  -
  if __name__ == "__main__":
  test.main()
  