code: 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)])
docs: Assert that text has n errors of type check.