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

Method test_cmdline_copy_inplace

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

Source from the content-addressed store, hash-verified

415 self.assertTrue(target.is_file())
416
417 def test_cmdline_copy_inplace(self):
418 # Test copying an archive in place fails.
419 original = self.make_archive()
420 target = self.tmpdir / 'target.pyz'
421 args = [str(original), '-o', str(original)]
422 with self.assertRaises(SystemExit) as cm:
423 zipapp.main(args)
424 # Program should exit with a non-zero return code.
425 self.assertTrue(cm.exception.code)
426
427 def test_cmdline_copy_change_main(self):
428 # Test copying an archive doesn't allow changing __main__.py.

Callers

nothing calls this directly

Calls 5

make_archiveMethod · 0.95
strFunction · 0.85
assertTrueMethod · 0.80
assertRaisesMethod · 0.45
mainMethod · 0.45

Tested by

no test coverage detected