git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fe61a53
)
test_pack_extra: Better way of testing packing with extra values.
author
Martin Pool
<mbp@samba.org>
Mon, 4 Nov 2002 21:57:53 +0000
(21:57 +0000)
committer
Martin 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
patch
|
blob
|
history
diff --git
a/source3/python/examples/tdbpack/test_tdbpack.py
b/source3/python/examples/tdbpack/test_tdbpack.py
index a6aecd1833c0d0903291c0689716779b3cc55cf1..c17f08097372040f5e3b1e39f04e9c0cd6e986b0 100755
(executable)
--- a/
source3/python/examples/tdbpack/test_tdbpack.py
+++ b/
source3/python/examples/tdbpack/test_tdbpack.py
@@
-124,14
+124,14
@@
class PackTests(unittest.TestCase):
def test_pack_extra(self):
"""Leftover values when packing"""
cases = [
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 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)
bin = packer(format, values)
out, rest = unpacker(format, bin)
- self.assertEquals(list(out), list(
values
))
+ self.assertEquals(list(out), list(
chopped
))
self.assertEquals(rest, '')
self.assertEquals(rest, '')