diff -r 1b8ba1346e67 Lib/test/test_sys.py --- a/Lib/test/test_sys.py Tue Feb 04 23:02:36 2014 +1000 +++ b/Lib/test/test_sys.py Tue Feb 04 16:01:49 2014 +0000 @@ -93,17 +93,11 @@ self.assertRaises(TypeError, sys.exit, 42, 42) # call without argument - try: - sys.exit(0) - except SystemExit as exc: - self.assertEqual(exc.code, 0) - except: - self.fail("wrong exception") - else: - self.fail("no exception") + rc = subprocess.call([sys.executable, "-c", + "import sys; sys.exit()"]) + self.assertEqual(rc, 0) - # call with tuple argument with one entry - # entry will be unpacked + # call with integer argument try: sys.exit(42) except SystemExit as exc: @@ -113,7 +107,8 @@ else: self.fail("no exception") - # call with integer argument + # call with tuple argument with one entry + # entry will be unpacked try: sys.exit((42,)) except SystemExit as exc: