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

Method test_from_file_bytes

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

Source from the content-addressed store, hash-verified

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')
3415 self.assertEqual(posixpath.basename(zi.filename), 'test')
3416 self.assertFalse(zi.is_dir())
3417 self.assertEqual(zi.file_size, os.path.getsize(__file__))
3418
3419 def test_from_file_fileno(self):
3420 with open(__file__, 'rb') as f:

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