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

Method test_make_archive_pathlike_cwd_default

Lib/test/test_shutil.py:2045–2054  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2043 self.assertTrue(os.path.isfile('test.zip'))
2044
2045 def test_make_archive_pathlike_cwd_default(self):
2046 called_args = []
2047 def archiver(base_name, base_dir, **kw):
2048 called_args.append((base_name, kw.get('root_dir')))
2049
2050 register_archive_format('xxx', archiver, [], 'xxx file')
2051 self.addCleanup(unregister_archive_format, 'xxx')
2052 with no_chdir:
2053 make_archive(FakePath('basename'), 'xxx')
2054 self.assertEqual(called_args, [('basename', None)])
2055
2056 def test_make_archive_pathlike_cwd_supports_root_dir(self):
2057 root_dir = self.mkdtemp()

Callers

nothing calls this directly

Calls 5

register_archive_formatFunction · 0.90
make_archiveFunction · 0.90
FakePathClass · 0.90
addCleanupMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected