From 577f2338f16bea055abc49c5a43fa3ecb05dffc8 Mon Sep 17 00:00:00 2001 From: Hasan Ramezani Date: Sat, 19 Dec 2020 20:53:30 +0100 Subject: Fixed #32208 -- Allowed adding lazy() objects. Co-authored-by: Claude Paroz --- tests/utils_tests/test_functional.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/utils_tests/test_functional.py') diff --git a/tests/utils_tests/test_functional.py b/tests/utils_tests/test_functional.py index 6e454cfef3..595479a503 100644 --- a/tests/utils_tests/test_functional.py +++ b/tests/utils_tests/test_functional.py @@ -184,6 +184,11 @@ class FunctionalTests(SimpleTestCase): with self.assertRaisesMessage(TypeError, msg): Foo().cp + def test_lazy_add(self): + lazy_4 = lazy(lambda: 4, int) + lazy_5 = lazy(lambda: 5, int) + self.assertEqual(lazy_4() + lazy_5(), 9) + def test_lazy_equality(self): """ == and != work correctly for Promises. -- cgit v1.3