mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #32208 -- Allowed adding lazy() objects.
Co-authored-by: Claude Paroz <claude@2xlibre.net>
This commit is contained in:
committed by
Mariusz Felisiak
parent
fe886eee36
commit
577f2338f1
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user