MCPcopy Index your code
hub / github.com/RustPython/RustPython / _assert_on_file_content

Method _assert_on_file_content

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

Source from the content-addressed store, hash-verified

854 return target_filepath, hardlink_filepath
855
856 def _assert_on_file_content(self, filepath, digest):
857 with open(filepath, "rb") as f:
858 data = f.read()
859 self.assertEqual(sha256sum(data), digest)
860
861 @unittest.skipUnless(
862 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