Merged revisions 80126 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80126 | benjamin.peterson | 2010-04-16 17:35:38 -0500 (Fri, 16 Apr 2010) | 1 line

  have a clear error when passing something > sys.maxsize to bytearray
........
diff --git a/Lib/test/test_bytes.py b/Lib/test/test_bytes.py
index c27cc3a..06ff4c9 100644
--- a/Lib/test/test_bytes.py
+++ b/Lib/test/test_bytes.py
@@ -75,6 +75,7 @@
 
         self.assertEqual(self.type2test('0', 'ascii'), b'0')
         self.assertEqual(self.type2test(b'0'), b'0')
+        self.assertRaises(OverflowError, self.type2test, sys.maxsize + 1)
 
     def test_constructor_type_errors(self):
         self.assertRaises(TypeError, self.type2test, 0.0)