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

Method test_from_dir

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

Source from the content-addressed store, hash-verified

3424 self.assertEqual(zi.file_size, os.path.getsize(__file__))
3425
3426 def test_from_dir(self):
3427 dirpath = os.path.dirname(os.path.abspath(__file__))
3428 zi = zipfile.ZipInfo.from_file(dirpath, 'stdlib_tests')
3429 self.assertEqual(zi.filename, 'stdlib_tests/')
3430 self.assertTrue(zi.is_dir())
3431 self.assertEqual(zi.compress_type, zipfile.ZIP_STORED)
3432 self.assertEqual(zi.file_size, 0)
3433
3434 def test_compresslevel_property(self):
3435 zinfo = zipfile.ZipInfo("xxx")

Callers

nothing calls this directly

Calls 6

assertTrueMethod · 0.80
dirnameMethod · 0.45
abspathMethod · 0.45
from_fileMethod · 0.45
assertEqualMethod · 0.45
is_dirMethod · 0.45

Tested by

no test coverage detected