diff options
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_sys.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py index 3bc1243..5a9699f 100644 --- a/Lib/test/test_sys.py +++ b/Lib/test/test_sys.py @@ -94,6 +94,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'') |