summaryrefslogtreecommitdiff
path: root/qpid/python/tests
diff options
context:
space:
mode:
authorRafael H. Schloming <rhs@apache.org>2008-05-12 15:37:10 +0000
committerRafael H. Schloming <rhs@apache.org>2008-05-12 15:37:10 +0000
commit193d13307baba2a3a2ede3682755f29860f5ed02 (patch)
treeeccd4ad2440198fe0c8cef693ddbb563522e2436 /qpid/python/tests
parent0561864d378247c76219948875bbdddd8e992f2d (diff)
downloadqpid-python-193d13307baba2a3a2ede3682755f29860f5ed02.tar.gz
QPID-947: added handler for known_completed and generate known_completed when timely-reply is set
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@655533 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/python/tests')
-rw-r--r--qpid/python/tests/datatypes.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/qpid/python/tests/datatypes.py b/qpid/python/tests/datatypes.py
index 5c6ee82283..6d8703ed4f 100644
--- a/qpid/python/tests/datatypes.py
+++ b/qpid/python/tests/datatypes.py
@@ -103,6 +103,34 @@ class RangedSetTest(TestCase):
assert range.lower == 0
assert range.upper == 8
+class RangeTest(TestCase):
+
+ def testIntersect1(self):
+ a = Range(0, 10)
+ b = Range(9, 20)
+ i1 = a.intersect(b)
+ i2 = b.intersect(a)
+ assert i1.upper == 10
+ assert i2.upper == 10
+ assert i1.lower == 9
+ assert i2.lower == 9
+
+ def testIntersect2(self):
+ a = Range(0, 10)
+ b = Range(11, 20)
+ assert a.intersect(b) == None
+ assert b.intersect(a) == None
+
+ def testIntersect3(self):
+ a = Range(0, 10)
+ b = Range(3, 5)
+ i1 = a.intersect(b)
+ i2 = b.intersect(a)
+ assert i1.upper == 5
+ assert i2.upper == 5
+ assert i1.lower == 3
+ assert i2.lower == 3
+
class UUIDTest(TestCase):
def test(self):