1
0
mirror of https://github.com/django/django.git synced 2024-11-19 16:04:13 +00:00
django/tests/regressiontests/utils/functional.py
Luke Plant bcef28349a Fixed #12506 - 'lazy' fails when there are multiple expected classes with the same method
Thanks to Alex for report and patch



git-svn-id: http://code.djangoproject.com/svn/django/trunk@12104 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-05 12:06:45 +00:00

11 lines
265 B
Python

from unittest import TestCase
from django.utils.functional import lazy
class FunctionalTestCase(TestCase):
def test_lazy(self):
t = lazy(lambda: tuple(range(3)), list, tuple)
for a, b in zip(t(), range(3)):
self.assertEqual(a, b)