@setup({'ifchanged-else01': '{% for id in ids %}{{ id }}'
                                '{% ifchanged id %}-first{% else %}-other{% endifchanged %}'
                                ',{% endfor %}'})
    def test_ifchanged_else01(self):
        output = self.engine.render_to_string('ifchanged-else01', {'ids': [1, 1, 2, 2, 2, 3]})
        self.assertEqual(output, '1-first,1-other,2-first,2-other,2-other,3-first,')
Test the else clause of ifchanged.
dataset/ETHPy150Open django/django/tests/template_tests/syntax_tests/test_if_changed.py/IfChangedTagTests.test_ifchanged_else01