From f34769235c625d5afe031076b6738f6ae672c3ff 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/qpid@806393 13f79535-47bb-0310-9956-ffa450edef68 --- python/tests/datatypes.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'python/tests') diff --git a/python/tests/datatypes.py b/python/tests/datatypes.py index 1a60bb4107..b00e5e78f8 100644 --- a/python/tests/datatypes.py +++ b/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