summaryrefslogtreecommitdiff
path: root/Lib/test/test_struct.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_struct.py')
-rw-r--r--Lib/test/test_struct.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_struct.py b/Lib/test/test_struct.py
index 4d9d601ef4..be0047589c 100644
--- a/Lib/test/test_struct.py
+++ b/Lib/test/test_struct.py
@@ -412,6 +412,10 @@ class StructTest(unittest.TestCase):
for i in range(6, len(test_string) + 1):
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):
test_string = b'Reykjavik rocks, eow!'
writable_buf = array.array('b', b' '*100)