def assertSynErr(self, msg: str) -> ContextManager[None]:
        """Assert that a `TempliteSyntaxError` will happen.

        A context manager, and the message should be `msg`.

        """
        pat = "^" + re.escape(msg) + "$"
        return pytest.raises(TempliteSyntaxError, match=pat)    # type: ignore
Assert that a `TempliteSyntaxError` will happen.

        A context manager, and the message should be `msg`.

        
tests/test_templite.py