예제 #1
0
파일: api.py 프로젝트: Pluckyduck/eve
    def test_cycler(self):
        items = (1, 2, 3)
        c = Cycler(*items)
        for item in items + items:
            pass

        c.next()
        c.reset()
예제 #2
0
 def test_cycler(self, env):
     items = 1, 2, 3
     c = Cycler(*items)
     for item in items + items:
         assert c.current == item
         assert next(c) == item
     next(c)
     assert c.current == 2
     c.reset()
     assert c.current == 1
예제 #3
0
파일: api.py 프로젝트: AJH693/jinja2
 def test_cycler(self):
     items = 1, 2, 3
     c = Cycler(*items)
     for item in items + items:
         assert c.current == item
         assert next(c) == item
     next(c)
     assert c.current == 2
     c.reset()
     assert c.current == 1
예제 #4
0
 def test_cycler_nextmethod(self, env):
     items = 1, 2, 3
     c = Cycler(*items)
     for item in items + items:
         assert c.current == item
         assert c.next() == item
     c.next()
     assert c.current == 2
     c.reset()
     assert c.current == 1
예제 #5
0
    def test_cycler(self):
        items = (1, 2, 3)
        c = Cycler(*items)
        for item in items + items:
            pass

        c.next()
        c.reset()
예제 #6
0
파일: test_api.py 프로젝트: moreati/jinja2
 def test_cycler_nextmethod(self, env):
     items = 1, 2, 3
     c = Cycler(*items)
     for item in items + items:
         assert c.current == item
         assert c.next() == item
     c.next()
     assert c.current == 2
     c.reset()
     assert c.current == 1