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

Method test_create_archive

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

Source from the content-addressed store, hash-verified

23 self.tmpdir = pathlib.Path(tmpdir.name)
24
25 def test_create_archive(self):
26 # Test packing a directory.
27 source = self.tmpdir / 'source'
28 source.mkdir()
29 (source / '__main__.py').touch()
30 target = self.tmpdir / 'source.pyz'
31 zipapp.create_archive(str(source), str(target))
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.

Callers

nothing calls this directly

Calls 5

strFunction · 0.85
assertTrueMethod · 0.80
mkdirMethod · 0.45
touchMethod · 0.45
is_fileMethod · 0.45

Tested by

no test coverage detected