mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
Merge heads
This commit is contained in:
commit
2bb6c358e8
1 changed files with 4 additions and 0 deletions
|
|
@ -91,6 +91,10 @@ class SysModuleTest(unittest.TestCase):
|
|||
self.assertRaises(TypeError, sys.exit, 42, 42)
|
||||
|
||||
# call without argument
|
||||
with self.assertRaises(SystemExit) as cm:
|
||||
sys.exit()
|
||||
self.assertIsNone(cm.exception.code)
|
||||
|
||||
rc, out, err = assert_python_ok('-c', 'import sys; sys.exit()')
|
||||
self.assertEqual(rc, 0)
|
||||
self.assertEqual(out, b'')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue