message: refactor random_seed_test
diff: @@ -115,6 +115,15 @@ def _test_random_seed_combinations():
  class RandomSeedTest(test_base.DatasetTestBase, parameterized.TestCase):
  + def _evaluate(self, tinput, toutput):
  + random_seed.set_random_seed(tinput[0])
  + g_seed, op_seed = data_random_seed.get_seed(tinput[1])
  + g_seed = self.evaluate(g_seed)
  + op_seed = self.evaluate(op_seed)
  + msg = 'test_case = {0}, got {1}, want {2}'.format(
  + tinput, (g_seed, op_seed), toutput)
  + self.assertEqual((g_seed, op_seed), toutput, msg=msg)
  +
  @combinations.generate(
  combinations.times(
  test_base.default_test_combinations(),
  @@ -123,13 +132,7 @@ class RandomSeedTest(test_base.DatasetTestBase, parameterized.TestCase):
  )
  def testRandomSeed(self, input_fn, output_fn):
  tinput, toutput = input_fn(), output_fn()
  - random_seed.set_random_seed(tinput[0])
  - g_seed, op_seed = data_random_seed.get_seed(tinput[1])
  - g_seed = self.evaluate(g_seed)
  - op_seed = self.evaluate(op_seed)
  - msg = 'test_case = {0}, got {1}, want {2}'.format(
  - tinput, (g_seed, op_seed), toutput)
  - self.assertEqual((g_seed, op_seed), toutput, msg=msg)
  + self._evaluate(tinput=tinput, toutput=toutput)
  random_seed.set_random_seed(None)
  @combinations.generate(test_base.graph_only_combinations())
  @@ -138,13 +141,7 @@ class RandomSeedTest(test_base.DatasetTestBase, parameterized.TestCase):
  for i in range(10):
  tinput = (1, None)
  toutput = (1, i)
  - random_seed.set_random_seed(tinput[0])
  - g_seed, op_seed = data_random_seed.get_seed(tinput[1])
  - g_seed = self.evaluate(g_seed)
  - op_seed = self.evaluate(op_seed)
  - msg = 'test_case = {0}, got {1}, want {2}'.format(
  - 1, (g_seed, op_seed), toutput)
  - self.assertEqual((g_seed, op_seed), toutput, msg=msg)
  + self._evaluate(tinput=tinput, toutput=toutput)
  if __name__ == '__main__':
  