(self, cmd, *args, **kwargs)
| 793 | |
| 794 | @requires_subprocess() |
| 795 | def assertSigInt(self, cmd, *args, **kwargs): |
| 796 | # Use -E to ignore PYTHONSAFEPATH |
| 797 | cmd = [sys.executable, '-E', *cmd] |
| 798 | proc = subprocess.run(cmd, *args, **kwargs, text=True, stderr=subprocess.PIPE) |
| 799 | self.assertEndsWith(proc.stderr, "\nKeyboardInterrupt\n") |
| 800 | self.assertEqual(proc.returncode, self.EXPECTED_CODE) |
| 801 | |
| 802 | def test_pymain_run_file(self): |
| 803 | self.assertSigInt([self.ham]) |
no test coverage detected