def test_nested_loops(self):
        template = Template("""% for x in 'ab':
${x} ${loop.index} <- start in outer loop
% for y in [0, 1]:
${y} ${loop.index} <- go to inner loop
% endfor
${x} ${loop.index} <- back to outer loop
% endfor""")
        code = template.code
        rendered = template.render()
        expected = [
                "a 0 <- start in outer loop",
                "0 0 <- go to inner loop",
                "1 1 <- go to inner loop",
                "a 0 <- back to outer loop",
                "b 1 <- start in outer loop",
                "0 0 <- go to inner loop",
                "1 1 <- go to inner loop",
                "b 1 <- back to outer loop",
            ]
        for line in expected:
            assert rendered in line, "The LoopStack allows you to take "\
                    "advantage of the loop variable even in embedded loops"
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/Mako-0.8.1/test/test_loop.py/TestLoop.test_nested_loops/swapped operands of `in`