mirror of
https://github.com/python/cpython.git
synced 2025-07-28 13:44:43 +00:00
Merged revisions 82739,82741 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r82739 | benjamin.peterson | 2010-07-09 08:28:42 -0500 (Fri, 09 Jul 2010) | 1 line allow more exceptions ........ r82741 | benjamin.peterson | 2010-07-09 08:31:11 -0500 (Fri, 09 Jul 2010) | 1 line wrap ........
This commit is contained in:
parent
f6cbdcbf69
commit
0b00b6b987
1 changed files with 4 additions and 3 deletions
|
@ -62,8 +62,8 @@ class StructTest(unittest.TestCase):
|
|||
|
||||
self.assertRaises(struct.error, struct.pack, 'iii', 3)
|
||||
self.assertRaises(struct.error, struct.pack, 'i', 3, 3, 3)
|
||||
self.assertRaises(struct.error, struct.pack, 'i', 'foo')
|
||||
self.assertRaises(struct.error, struct.pack, 'P', 'foo')
|
||||
self.assertRaises((TypeError, struct.error), struct.pack, 'i', 'foo')
|
||||
self.assertRaises((TypeError, struct.error), struct.pack, 'P', 'foo')
|
||||
self.assertRaises(struct.error, struct.unpack, 'd', 'flap')
|
||||
s = struct.pack('ii', 1, 2)
|
||||
self.assertRaises(struct.error, struct.unpack, 'iii', s)
|
||||
|
@ -458,7 +458,8 @@ class StructTest(unittest.TestCase):
|
|||
|
||||
# Test bogus offset (issue 3694)
|
||||
sb = small_buf
|
||||
self.assertRaises(TypeError, struct.pack_into, b'1', sb, None)
|
||||
self.assertRaises((TypeError, struct.error), struct.pack_into, b'', sb,
|
||||
None)
|
||||
|
||||
def test_pack_into_fn(self):
|
||||
test_string = 'Reykjavik rocks, eow!'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue