def METHOD_NAME(self):
    q = 'run.hash == "x" && metric.name == "y"'
    try:
        syntax_error_check(q)
    except SyntaxError as se:
        self.assertEqual(19, se.offset)  # count for added ()
        self.assertEqual(1, se.lineno)
    else:
        self.fail('SyntaxError is not raised')