summaryrefslogtreecommitdiff
path: root/tests/utils_tests/test_lazyobject.py
diff options
context:
space:
mode:
authorJavier Buzzi <buzzi.javier@gmail.com>2018-09-19 19:51:01 +0200
committerTim Graham <timograham@gmail.com>2018-09-19 13:51:01 -0400
commita0d63b02c34e6d18d7219cce4d828f71432265e9 (patch)
treeb72d4a6c6c0f31777f5259fb379b4e0d3080b5bc /tests/utils_tests/test_lazyobject.py
parent9cbdb44014c8027f1b4571bac701a247b0ce02a3 (diff)
Fixed #29772 -- Made LazyObject proxy __lt__() and __gt__().
Diffstat (limited to 'tests/utils_tests/test_lazyobject.py')
-rw-r--r--tests/utils_tests/test_lazyobject.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/utils_tests/test_lazyobject.py b/tests/utils_tests/test_lazyobject.py
index 2bba558843..e5bccc6362 100644
--- a/tests/utils_tests/test_lazyobject.py
+++ b/tests/utils_tests/test_lazyobject.py
@@ -66,6 +66,16 @@ class LazyObjectTestCase(TestCase):
self.assertNotEqual(obj1, obj2)
self.assertNotEqual(obj1, 'bar')
+ def test_lt(self):
+ obj1 = self.lazy_wrap(1)
+ obj2 = self.lazy_wrap(2)
+ self.assertLess(obj1, obj2)
+
+ def test_gt(self):
+ obj1 = self.lazy_wrap(1)
+ obj2 = self.lazy_wrap(2)
+ self.assertGreater(obj2, obj1)
+
def test_bytes(self):
obj = self.lazy_wrap(b'foo')
self.assertEqual(bytes(obj), b'foo')