MCPcopy Index your code
hub / github.com/python/cpython / _assert_on_file_content

Method _assert_on_file_content

Lib/test/test_tarfile.py:854–857  ·  view source on GitHub ↗
(self, filepath, digest)

Source from the content-addressed store, hash-verified

852 return target_filepath, hardlink_filepath
853
854 def _assert_on_file_content(self, filepath, digest):
855 with open(filepath, "rb") as f:
856 data = f.read()
857 self.assertEqual(sha256sum(data), digest)
858
859 @unittest.skipUnless(
860 hasattr(os, "link"), "Missing hardlink implementation"

Calls 4

sha256sumFunction · 0.85
openFunction · 0.50
readMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected