Skip to content

Commit 45b931f

Browse files
committed
Test of pack_into_dict with missing value.
1 parent 663288d commit 45b931f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/test_bitstruct.py

+7
Original file line numberDiff line numberDiff line change
@@ -713,6 +713,13 @@ def test_pack_dict_missing_key(self):
713713
self.assertEqual(str(cm.exception),
714714
"'fam' not found in data dictionary")
715715

716+
with self.assertRaises(Error) as cm:
717+
data = bytearray(3)
718+
pack_into_dict(fmt, names, data, 0, unpacked)
719+
720+
self.assertEqual(str(cm.exception),
721+
"'fam' not found in data dictionary")
722+
716723
def test_compile_pack_unpack_formats(self):
717724
fmts = [
718725
('u1s2p3', None, (1, -1)),

0 commit comments

Comments
 (0)