diff options
Diffstat (limited to 'python')
-rw-r--r-- | python/qpid/codec010.py | 2 | ||||
-rw-r--r-- | python/tests/codec010.py | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/python/qpid/codec010.py b/python/qpid/codec010.py index dac023e2bd..c2ea7ed512 100644 --- a/python/qpid/codec010.py +++ b/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/python/tests/codec010.py b/python/tests/codec010.py index 835966e103..bbe894b7b3 100644 --- a/python/tests/codec010.py +++ b/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) |