2010-10-11 20:55:17 +08:00
|
|
|
from django.utils import unittest
|
2010-01-05 20:06:45 +08:00
|
|
|
from django.utils.functional import lazy
|
|
|
|
|
|
|
|
|
2010-09-28 16:18:12 +08:00
|
|
|
class FunctionalTestCase(unittest.TestCase):
|
2010-01-05 20:06:45 +08:00
|
|
|
def test_lazy(self):
|
|
|
|
t = lazy(lambda: tuple(range(3)), list, tuple)
|
|
|
|
for a, b in zip(t(), range(3)):
|
|
|
|
self.assertEqual(a, b)
|