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

Method _test_member

Lib/test/test_tarfile.py:1088–1103  ·  view source on GitHub ↗
(self, tarinfo, chksum=None, **kwargs)

Source from the content-addressed store, hash-verified

1086class MemberReadTest(ReadTest, unittest.TestCase):
1087
1088 def _test_member(self, tarinfo, chksum=None, **kwargs):
1089 if chksum is not None:
1090 with self.tar.extractfile(tarinfo) as f:
1091 self.assertEqual(sha256sum(f.read()), chksum,
1092 "wrong sha256sum for %s" % tarinfo.name)
1093
1094 kwargs["mtime"] = 0o7606136617
1095 kwargs["uid"] = 1000
1096 kwargs["gid"] = 100
1097 if "old-v7" not in tarinfo.name:
1098 # V7 tar can't handle alphabetic owners.
1099 kwargs["uname"] = "tarfile"
1100 kwargs["gname"] = "tarfile"
1101 for k, v in kwargs.items():
1102 self.assertEqual(getattr(tarinfo, k), v,
1103 "wrong value in %s field of %s" % (k, tarinfo.name))
1104
1105 def test_find_regtype(self):
1106 tarinfo = self.tar.getmember("ustar/regtype")

Callers 15

test_find_regtypeMethod · 0.95
test_find_conttypeMethod · 0.95
test_find_dirtypeMethod · 0.95
test_find_lnktypeMethod · 0.95
test_find_symtypeMethod · 0.95
test_find_blktypeMethod · 0.95
test_find_chrtypeMethod · 0.95
test_find_fifotypeMethod · 0.95
test_find_sparseMethod · 0.95
test_find_gnusparseMethod · 0.95

Calls 6

sha256sumFunction · 0.85
getattrFunction · 0.85
extractfileMethod · 0.80
assertEqualMethod · 0.45
readMethod · 0.45
itemsMethod · 0.45

Tested by

no test coverage detected