diff options
author | Manjunath Kudlur <keveman@gmail.com> | 2015-11-06 16:27:58 -0800 |
---|---|---|
committer | Manjunath Kudlur <keveman@gmail.com> | 2015-11-06 16:27:58 -0800 |
commit | f41959ccb2d9d4c722fe8fc3351401d53bcf4900 (patch) | |
tree | ef0ca22cb2a5ac4bdec9d080d8e0788a53ed496d /tensorflow/python/kernel_tests/save_restore_ops_test.py |
TensorFlow: Initial commit of TensorFlow library.
TensorFlow is an open source software library for numerical computation
using data flow graphs.
Base CL: 107276108
Diffstat (limited to 'tensorflow/python/kernel_tests/save_restore_ops_test.py')
-rw-r--r-- | tensorflow/python/kernel_tests/save_restore_ops_test.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tensorflow/python/kernel_tests/save_restore_ops_test.py b/tensorflow/python/kernel_tests/save_restore_ops_test.py new file mode 100644 index 0000000000..d59d76c58f --- /dev/null +++ b/tensorflow/python/kernel_tests/save_restore_ops_test.py @@ -0,0 +1,21 @@ +"""Tests for tensorflow.ops.io_ops.""" +import tensorflow.python.platform + +import tensorflow as tf +from tensorflow.python.ops import gen_io_ops + + +class ShardedFileOpsTest(tf.test.TestCase): + + def testShardedFileName(self): + with tf.Session( + target="", + config=tf.ConfigProto(device_count={"CPU": 2})): + self.assertEqual(gen_io_ops._sharded_filename("foo", 4, 100).eval(), + "foo-00004-of-00100") + self.assertEqual(gen_io_ops._sharded_filespec("foo", 100).eval(), + "foo-?????-of-00100") + + +if __name__ == "__main__": + tf.test.main() |