mirror of
https://github.com/python/cpython.git
synced 2025-08-28 12:45:07 +00:00
bpo-34984: Improve error messages for bytes and bytearray constructors. (GH-9874)
This commit is contained in:
parent
914f9a078f
commit
2c2044e789
3 changed files with 25 additions and 6 deletions
|
@ -169,6 +169,8 @@ class BaseBytesTest:
|
|||
self.assertRaises(TypeError, self.type2test, [0.0])
|
||||
self.assertRaises(TypeError, self.type2test, [None])
|
||||
self.assertRaises(TypeError, self.type2test, [C()])
|
||||
self.assertRaises(TypeError, self.type2test, encoding='ascii')
|
||||
self.assertRaises(TypeError, self.type2test, errors='ignore')
|
||||
self.assertRaises(TypeError, self.type2test, 0, 'ascii')
|
||||
self.assertRaises(TypeError, self.type2test, b'', 'ascii')
|
||||
self.assertRaises(TypeError, self.type2test, 0, errors='ignore')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue