Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e959776 commit 1f9e601Copy full SHA for 1f9e601
1 file changed
Lib/test/test_sys.py
@@ -91,6 +91,10 @@ def test_exit(self):
91
self.assertRaises(TypeError, sys.exit, 42, 42)
92
93
# call without argument
94
+ with self.assertRaises(SystemExit) as cm:
95
+ sys.exit()
96
+ self.assertIsNone(cm.exception.code)
97
+
98
rc, out, err = assert_python_ok('-c', 'import sys; sys.exit()')
99
self.assertEqual(rc, 0)
100
self.assertEqual(out, b'')
0 commit comments