From 7d955b5b4f78981b7bf596c70327b5a909bdfb15 Mon Sep 17 00:00:00 2001 From: "Rafael H. Schloming" Date: Thu, 20 Aug 2009 23:03:28 +0000 Subject: implemented reconnect and separated out the protocol driver from the messaging client git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@806393 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/python/tests/datatypes.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'qpid/python/tests') diff --git a/qpid/python/tests/datatypes.py b/qpid/python/tests/datatypes.py index 1a60bb4107..b00e5e78f8 100644 --- a/qpid/python/tests/datatypes.py +++ b/qpid/python/tests/datatypes.py @@ -54,6 +54,19 @@ class SerialTest(TestCase): d[serial(0)] = "zero" assert d[0] == "zero" + def testAdd(self): + assert serial(2) + 2 == serial(4) + assert serial(2) + 2 == 4 + + def testSub(self): + delta = serial(4) - serial(2) + assert isinstance(delta, int) or isinstance(delta, long) + assert delta == 2 + + delta = serial(4) - 2 + assert isinstance(delta, Serial) + assert delta == serial(2) + class RangedSetTest(TestCase): def check(self, ranges): -- cgit v1.2.1