diff options
| -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) |
