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

Method test_create_archive_with_pathlib

Lib/test/test_zipapp.py:34–41  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

32 self.assertTrue(target.is_file())
33
34 def test_create_archive_with_pathlib(self):
35 # Test packing a directory using Path objects for source and target.
36 source = self.tmpdir / 'source'
37 source.mkdir()
38 (source / '__main__.py').touch()
39 target = self.tmpdir / 'source.pyz'
40 zipapp.create_archive(source, target)
41 self.assertTrue(target.is_file())
42
43 def test_create_archive_with_subdirs(self):
44 # Test packing a directory includes entries for subdirectories.

Callers

nothing calls this directly

Calls 4

assertTrueMethod · 0.80
mkdirMethod · 0.45
touchMethod · 0.45
is_fileMethod · 0.45

Tested by

no test coverage detected