コード例 #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