test_pack_extra: Better way of testing packing with extra values.
authorMartin Pool <mbp@samba.org>
Mon, 4 Nov 2002 21:57:53 +0000 (21:57 +0000)
committerMartin Pool <mbp@samba.org>
Mon, 4 Nov 2002 21:57:53 +0000 (21:57 +0000)
(This used to be commit 12c3bb99a5f870b01ef389ddad1073fc92d2362c)

source3/python/examples/tdbpack/test_tdbpack.py

index a6aecd1833c0d0903291c0689716779b3cc55cf1..c17f08097372040f5e3b1e39f04e9c0cd6e986b0 100755 (executable)
@@ -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, '')