mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Move get_signal_name() to test.support (#121251)
* Move get_signal_name() from test.libregrtest to test.support. * Use get_signal_name() in support.script_helper. * support.script_helper now decodes stdout and stderr from UTF-8, instead of ASCII, if a command failed.
This commit is contained in:
parent
bfe0e4d769
commit
7435f053b4
6 changed files with 65 additions and 58 deletions
|
@ -2329,16 +2329,6 @@ class TestUtils(unittest.TestCase):
|
|||
self.assertIsNone(normalize('setUpModule (test.test_x)', is_error=True))
|
||||
self.assertIsNone(normalize('tearDownModule (test.test_module)', is_error=True))
|
||||
|
||||
def test_get_signal_name(self):
|
||||
for exitcode, expected in (
|
||||
(-int(signal.SIGINT), 'SIGINT'),
|
||||
(-int(signal.SIGSEGV), 'SIGSEGV'),
|
||||
(128 + int(signal.SIGABRT), 'SIGABRT'),
|
||||
(3221225477, "STATUS_ACCESS_VIOLATION"),
|
||||
(0xC00000FD, "STATUS_STACK_OVERFLOW"),
|
||||
):
|
||||
self.assertEqual(utils.get_signal_name(exitcode), expected, exitcode)
|
||||
|
||||
def test_format_resources(self):
|
||||
format_resources = utils.format_resources
|
||||
ALL_RESOURCES = utils.ALL_RESOURCES
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue