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

Method test_from_file_pathlike

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

Source from the content-addressed store, hash-verified

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__))
3409 self.assertEqual(posixpath.basename(zi.filename), 'test_core.py')
3410 self.assertFalse(zi.is_dir())
3411 self.assertEqual(zi.file_size, os.path.getsize(__file__))
3412
3413 def test_from_file_bytes(self):
3414 zi = zipfile.ZipInfo.from_file(os.fsencode(__file__), 'test')

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected