MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / testCopy

Method testCopy

tensorflow/python/lib/io/file_io_test.py:171–179  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

169 self.assertFalse(file_io.file_exists(file_path))
170
171 def testCopy(self):
172 file_path = os.path.join(self._base_dir, "temp_file")
173 file_io.FileIO(file_path, mode="w").write("testing")
174 copy_path = os.path.join(self._base_dir, "copy_file")
175 file_io.copy(file_path, copy_path)
176 self.assertTrue(file_io.file_exists(copy_path))
177 f = file_io.FileIO(file_path, mode="r")
178 self.assertEqual("testing", f.read())
179 self.assertEqual(7, f.tell())
180
181 def testCopyOverwrite(self):
182 file_path = os.path.join(self._base_dir, "temp_file")

Callers

nothing calls this directly

Calls 5

readMethod · 0.95
tellMethod · 0.95
joinMethod · 0.45
writeMethod · 0.45
copyMethod · 0.45

Tested by

no test coverage detected