diff options
author | Thomas Wouters <thomas@python.org> | 2006-08-22 13:41:17 (GMT) |
---|---|---|
committer | Thomas Wouters <thomas@python.org> | 2006-08-22 13:41:17 (GMT) |
commit | d204a715f4776fc2e5498e81c9e7a647e902b682 (patch) | |
tree | fd0fdb62b9df60800d49ccf610d907870c789fa1 /Lib | |
parent | 89da5d7c3d9cf5bfd4a374e23fd924bbffdeaf5c (diff) | |
download | cpython-d204a715f4776fc2e5498e81c9e7a647e902b682.zip cpython-d204a715f4776fc2e5498e81c9e7a647e902b682.tar.gz cpython-d204a715f4776fc2e5498e81c9e7a647e902b682.tar.bz2 |
Make bytesobject raise ValueError instead of TypeError again (thanks, Nick)
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_bytes.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_bytes.py b/Lib/test/test_bytes.py index 06beb1d..d45ff64 100644 --- a/Lib/test/test_bytes.py +++ b/Lib/test/test_bytes.py @@ -60,13 +60,13 @@ class BytesTest(unittest.TestCase): self.assertRaises(ValueError, bytes, [-1]) self.assertRaises(ValueError, bytes, [-sys.maxint]) self.assertRaises(ValueError, bytes, [-sys.maxint-1]) - self.assertRaises(TypeError, bytes, [-sys.maxint-2]) - self.assertRaises(TypeError, bytes, [-10**100]) + self.assertRaises(ValueError, bytes, [-sys.maxint-2]) + self.assertRaises(ValueError, bytes, [-10**100]) self.assertRaises(ValueError, bytes, [256]) self.assertRaises(ValueError, bytes, [257]) self.assertRaises(ValueError, bytes, [sys.maxint]) - self.assertRaises(TypeError, bytes, [sys.maxint+1]) - self.assertRaises(TypeError, bytes, [10**100]) + self.assertRaises(ValueError, bytes, [sys.maxint+1]) + self.assertRaises(ValueError, bytes, [10**100]) def test_repr(self): self.assertEqual(repr(bytes()), "bytes()") |