import tensorflow as tf


    self.assertEqual(
        tf.train.latest_checkpoint(self.get_temp_dir()),
        os.path.join(self.get_temp_dir(), "sharded-?????-of-00002"))

  def testSaverDef(self):
    with self.test_session():
      v0 = tf.Variable(123, name="v0")
      save = tf.train.Saver({"v0": v0}, sharded=True)
      sd = save.as_saver_def()
      self.assertTrue(sd.sharded)


class MaxToKeepTest(tf.test.TestCase):
