PageRenderTime 333ms CodeModel.GetById 140ms app.highlight 2ms RepoModel.GetById 190ms app.codeStats 0ms

/tests/regressiontests/utils/functional.py

https://code.google.com/p/mango-py/
Python | 9 lines | 7 code | 2 blank | 0 comment | 2 complexity | 9dd31047af1b6810ff75d8e71f95fbf9 MD5 | raw file
1from django.utils import unittest
2from django.utils.functional import lazy
3
4
5class FunctionalTestCase(unittest.TestCase):
6    def test_lazy(self):
7        t = lazy(lambda: tuple(range(3)), list, tuple)
8        for a, b in zip(t(), range(3)):
9            self.assertEqual(a, b)