1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Allowed multiplication of lazy() objects with int return type.

This commit is contained in:
Nick Pope
2023-06-07 12:13:34 +01:00
committed by Mariusz Felisiak
parent 45466f11f2
commit fd97b0471b
2 changed files with 4 additions and 0 deletions

View File

@@ -230,6 +230,7 @@ class FunctionalTests(SimpleTestCase):
lazy_5 = lazy(lambda: 5, int)
self.assertEqual(4 * lazy_5(), 20)
self.assertEqual(lazy_4() * 5, 20)
self.assertEqual(lazy_4() * lazy_5(), 20)
def test_lazy_mul_list(self):
lazy_4 = lazy(lambda: [4], list)