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

Method test_from_file

Lib/test/test_zipfile/test_core.py:3401–3405  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3399
3400class ZipInfoTests(unittest.TestCase):
3401 def test_from_file(self):
3402 zi = zipfile.ZipInfo.from_file(__file__)
3403 self.assertEqual(posixpath.basename(zi.filename), 'test_core.py')
3404 self.assertFalse(zi.is_dir())
3405 self.assertEqual(zi.file_size, os.path.getsize(__file__))
3406
3407 def test_from_file_pathlike(self):
3408 zi = zipfile.ZipInfo.from_file(FakePath(__file__))

Callers

nothing calls this directly

Calls 5

assertFalseMethod · 0.80
from_fileMethod · 0.45
assertEqualMethod · 0.45
basenameMethod · 0.45
is_dirMethod · 0.45

Tested by

no test coverage detected