else:
self.fail("no exception")
+ # test that the exit machinery handles SystemExits properly
+ import subprocess
+ # both unnormalized...
+ rc = subprocess.call([sys.executable, "-c",
+ "raise SystemExit, 46"])
+ self.assertEqual(rc, 46)
+ # ... and normalized
+ rc = subprocess.call([sys.executable, "-c",
+ "raise SystemExit(47)"])
+ self.assertEqual(rc, 47)
+
+
def test_getdefaultencoding(self):
if test.test_support.have_unicode:
self.assertRaises(TypeError, sys.getdefaultencoding, 42)