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

Method testReadlines

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

Source from the content-addressed store, hash-verified

463 self.assertSequenceEqual(actual_data, data)
464
465 def testReadlines(self):
466 file_path = os.path.join(self._base_dir, "temp_file")
467 data = ["testing1\n", "testing2\n", "testing3\n", "\n", "testing5"]
468 f = file_io.FileIO(file_path, mode="r+")
469 f.write("".join(data))
470 f.flush()
471 lines = f.readlines()
472 self.assertSequenceEqual(lines, data)
473
474 def testUTF8StringPath(self):
475 file_path = os.path.join(self._base_dir, "UTF8测试_file")

Callers

nothing calls this directly

Calls 4

writeMethod · 0.95
flushMethod · 0.95
readlinesMethod · 0.95
joinMethod · 0.45

Tested by

no test coverage detected