Merge 3.5

This commit is contained in:
Victor Stinner 2017-02-02 14:18:43 +01:00
commit 64e91275e3
1 changed files with 4 additions and 0 deletions

View File

@ -412,6 +412,10 @@ class StructTest(unittest.TestCase):
for i in range(6, len(test_string) + 1): for i in range(6, len(test_string) + 1):
self.assertRaises(struct.error, struct.unpack_from, fmt, data, i) self.assertRaises(struct.error, struct.unpack_from, fmt, data, i)
# keyword arguments
self.assertEqual(s.unpack_from(buffer=test_string, offset=2),
(b'cd01',))
def test_pack_into(self): def test_pack_into(self):
test_string = b'Reykjavik rocks, eow!' test_string = b'Reykjavik rocks, eow!'
writable_buf = array.array('b', b' '*100) writable_buf = array.array('b', b' '*100)