summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_bytes.py
diff options
context:
space:
mode:
authorThomas Wouters <thomas@python.org>2006-08-22 13:41:17 (GMT)
committerThomas Wouters <thomas@python.org>2006-08-22 13:41:17 (GMT)
commitd204a715f4776fc2e5498e81c9e7a647e902b682 (patch)
treefd0fdb62b9df60800d49ccf610d907870c789fa1 /Lib/test/test_bytes.py
parent89da5d7c3d9cf5bfd4a374e23fd924bbffdeaf5c (diff)
downloadcpython-d204a715f4776fc2e5498e81c9e7a647e902b682.zip
cpython-d204a715f4776fc2e5498e81c9e7a647e902b682.tar.gz
cpython-d204a715f4776fc2e5498e81c9e7a647e902b682.tar.bz2
Make bytesobject raise ValueError instead of TypeError again (thanks, Nick)
Diffstat (limited to 'Lib/test/test_bytes.py')
-rw-r--r--Lib/test/test_bytes.py8
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()")