mirror of
https://github.com/python/cpython.git
synced 2025-08-01 15:43:13 +00:00
#3694: add test for fix committed in r66693.
This commit is contained in:
parent
5ccf2ae21c
commit
0638a08a4b
1 changed files with 4 additions and 0 deletions
|
@ -512,6 +512,10 @@ class StructTest(unittest.TestCase):
|
|||
self.assertRaises(struct.error, s.pack_into, small_buf, 0, test_string)
|
||||
self.assertRaises(struct.error, s.pack_into, small_buf, 2, test_string)
|
||||
|
||||
# Test bogus offset (issue 3694)
|
||||
sb = small_buf
|
||||
self.assertRaises(TypeError, struct.pack_into, b'1', sb, None)
|
||||
|
||||
def test_pack_into_fn(self):
|
||||
test_string = 'Reykjavik rocks, eow!'
|
||||
writable_buf = array.array('c', ' '*100)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue