diff options
| author | Hasan Ramezani <hasan.r67@gmail.com> | 2020-12-19 20:53:30 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-12-21 09:24:41 +0100 |
| commit | 577f2338f16bea055abc49c5a43fa3ecb05dffc8 (patch) | |
| tree | eb6a5dfa1d16946da0b14a3a462bd82bf5d12942 /tests/utils_tests/test_functional.py | |
| parent | fe886eee36be8022f34cfe59aa61ff1c21fe01d9 (diff) | |
Fixed #32208 -- Allowed adding lazy() objects.
Co-authored-by: Claude Paroz <claude@2xlibre.net>
Diffstat (limited to 'tests/utils_tests/test_functional.py')
| -rw-r--r-- | tests/utils_tests/test_functional.py | 5 |
1 files changed, 5 insertions, 0 deletions
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. |
