diff --git a/tests/test_bitstruct.py b/tests/test_bitstruct.py
index <HASH>..<HASH> 100644
--- a/tests/test_bitstruct.py
+++ b/tests/test_bitstruct.py
@@ -713,6 +713,13 @@ class BitStructTest(unittest.TestCase):
         self.assertEqual(str(cm.exception),
                          "'fam' not found in data dictionary")
 
+        with self.assertRaises(Error) as cm:
+            data = bytearray(3)
+            pack_into_dict(fmt, names, data, 0, unpacked)
+
+        self.assertEqual(str(cm.exception),
+                         "'fam' not found in data dictionary")
+
     def test_compile_pack_unpack_formats(self):
         fmts = [
             ('u1s2p3',         None, (1, -1)),
Test of pack_into_dict with missing value.