1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-07 20:23:50 +03:00

test_pack_extra: Better way of testing packing with extra values.

This commit is contained in:
Martin Pool
-
parent 0c1cfe5598
commit 12c3bb99a5

View File

@@ -124,14 +124,14 @@ class PackTests(unittest.TestCase):
def test_pack_extra(self):
"""Leftover values when packing"""
cases = [
('d', [10, 20]),
('d', [10, 20], [10]),
]
for unpacker in both_unpackers:
for packer in both_packers:
for format, values in cases:
for format, values, chopped in cases:
bin = packer(format, values)
out, rest = unpacker(format, bin)
self.assertEquals(list(out), list(values))
self.assertEquals(list(out), list(chopped))
self.assertEquals(rest, '')