diff options
author | Rafael H. Schloming <rhs@apache.org> | 2008-10-28 17:19:07 +0000 |
---|---|---|
committer | Rafael H. Schloming <rhs@apache.org> | 2008-10-28 17:19:07 +0000 |
commit | 3f2d66ae172f6bfd8b8a257e68ea425c01bbb9d9 (patch) | |
tree | 04065db23af012180e3fa8fbef7926334423d2bb | |
parent | 7c32802a739e5930b06a6de1619110ca1df087d6 (diff) | |
download | qpid-python-3f2d66ae172f6bfd8b8a257e68ea425c01bbb9d9.tar.gz |
fixed a bug in int16 codec
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@708615 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | qpid/python/qpid/codec010.py | 2 | ||||
-rw-r--r-- | qpid/python/tests/codec010.py | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/qpid/python/qpid/codec010.py b/qpid/python/qpid/codec010.py index dac023e2bd..c2ea7ed512 100644 --- a/qpid/python/qpid/codec010.py +++ b/qpid/python/qpid/codec010.py @@ -68,7 +68,7 @@ class Codec(Packer): def read_int16(self): return self.unpack("!h") def write_int16(self, n): - return self.unpack("!h", n) + self.pack("!h", n) def read_uint32(self): diff --git a/qpid/python/tests/codec010.py b/qpid/python/tests/codec010.py index 835966e103..bbe894b7b3 100644 --- a/qpid/python/tests/codec010.py +++ b/qpid/python/tests/codec010.py @@ -86,3 +86,7 @@ class CodecTest(TestCase): def testArrayNone(self): self.check("array", None) + + def testInt16(self): + self.check("int16", 3) + self.check("int16", -3) |