MCPcopy Create free account
hub / github.com/PyTables/PyTables / test00_CompareFile

Method test00_CompareFile

tables/nodes/tests/test_filenode.py:397–409  ·  view source on GitHub ↗

Reading and comparing a whole file node.

(self)

Source from the content-addressed store, hash-verified

395 super().tearDown()
396
397 def test00_CompareFile(self):
398 """Reading and comparing a whole file node."""
399
400 import hashlib
401
402 dfiledigest = hashlib.md5(self.datafile.read()).digest()
403 fnodedigest = hashlib.md5(self.fnode.read()).digest()
404
405 self.assertEqual(
406 dfiledigest,
407 fnodedigest,
408 "Data read from file node differs from that in the file on disk.",
409 )
410
411 def test01_Write(self):
412 """Writing on a read-only file."""

Callers

nothing calls this directly

Calls 1

readMethod · 0.45

Tested by

no test coverage detected