(self, cmd, *args, **kwargs)
| 835 | |
| 836 | @requires_subprocess() |
| 837 | def assertSigInt(self, cmd, *args, **kwargs): |
| 838 | # Use -E to ignore PYTHONSAFEPATH |
| 839 | cmd = [sys.executable, '-E', *cmd] |
| 840 | proc = subprocess.run(cmd, *args, **kwargs, text=True, stderr=subprocess.PIPE) |
| 841 | self.assertEndsWith(proc.stderr, "\nKeyboardInterrupt\n") |
| 842 | self.assertEqual(proc.returncode, self.EXPECTED_CODE) |
| 843 | |
| 844 | def test_pymain_run_file(self): |
| 845 | self.assertSigInt([self.ham]) |
no test coverage detected