Bug #1563759: struct.unpack doens't support buffer protocol objects
diff --git a/Lib/test/test_struct.py b/Lib/test/test_struct.py
index 66fd667..7ecb6ac 100644
--- a/Lib/test/test_struct.py
+++ b/Lib/test/test_struct.py
@@ -612,8 +612,14 @@
     assertRaises(struct.error, pack_into, small_buf, 0, test_string)
     assertRaises(struct.error, pack_into, small_buf, 2, test_string)
 
+def test_unpack_with_buffer():
+    # SF bug 1563759: struct.unpack doens't support buffer protocol objects
+    data = array.array('B', '\x12\x34\x56\x78')
+    value, = struct.unpack('>I', data)
+    vereq(value, 0x12345678)
 
 # Test methods to pack and unpack from buffers rather than strings.
 test_unpack_from()
 test_pack_into()
 test_pack_into_fn()
+test_unpack_with_buffer()