def assert_syntax_error(self, tmpl, error):
        try:
            Template(tmpl)
        except TemplateSyntaxError as e:
            self.assertTrue(
                str(e).endswith(error),
                "%s didn't end with %s" % (str(e), error)
            )
        else:
            self.fail("Didn't raise")
dataset/ETHPy150Open alex/django-templatetag-sugar/templatetag_sugar/tests/tests.py/SugarTestCase.assert_syntax_error/original