'Test a lot of math strings that give syntax errors
Rather than have a lot of self.assertRaises, make a loop and keep track
of those that do not throw a `ParseException`, and assert at the end.'

def test_syntax_errors(self):

    bad_math_list = ['11+', '11*', 'f((x)', 'sqrt(x^)', '3f(x)', '3|4', '3|||4']
    bad_exceptions = {}
    for math in bad_math_list:
        try:
            preview.latex_preview(math)
        except pyparsing.ParseException:
            pass
        except Exception as error:
            bad_exceptions[math] = error
        else:
            bad_exceptions[math] = None
    self.assertEquals({}, bad_exceptions)
