(self)
| 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. |
| 429 | original = self.make_archive() |
| 430 | target = self.tmpdir / 'target.pyz' |
| 431 | args = [str(original), '-o', str(target), '-m', 'foo:bar'] |
| 432 | with self.assertRaises(SystemExit) as cm: |
| 433 | zipapp.main(args) |
| 434 | # Program should exit with a non-zero return code. |
| 435 | self.assertTrue(cm.exception.code) |
| 436 | |
| 437 | @patch('sys.stdout', new_callable=io.StringIO) |
| 438 | def test_info_command(self, mock_stdout): |
nothing calls this directly
no test coverage detected