def assert_error ( text , check , n = 1 ) : assert_error . description = "No {} error for '{}'" . format ( check , text ) assert ( check in [ error [ 0 ] for error in lint ( text ) ] )
python unittest assert msg
Assert that text has n errors of type check .
def assert_error(text, check, n=1):
    """Assert that text has n errors of type check."""
    assert_error.description = "No {} error for '{}'".format(check, text)
    assert(check in [error[0] for error in lint(text)])