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

Method testEof

tensorflow/python/lib/io/file_io_test.py:480–488  ·  view source on GitHub ↗

Test that reading past EOF does not raise an exception.

(self)

Source from the content-addressed store, hash-verified

478 self.assertEqual(b"testing", f.read())
479
480 def testEof(self):
481 """Test that reading past EOF does not raise an exception."""
482
483 file_path = os.path.join(self._base_dir, "temp_file")
484 f = file_io.FileIO(file_path, mode="r+")
485 content = "testing"
486 f.write(content)
487 f.flush()
488 self.assertEqual(content, f.read(len(content) + 1))
489
490 def testUTF8StringPathExists(self):
491 file_path = os.path.join(self._base_dir, "UTF8测试_file_exist")

Callers

nothing calls this directly

Calls 4

writeMethod · 0.95
flushMethod · 0.95
readMethod · 0.95
joinMethod · 0.45

Tested by

no test coverage detected