code: def error(self, reason=None):
          '''
          Set the test status to Report.ERROR, and set the error reason
  
          :param reason: error reason (default: None)
          '''
          self.set_status(Report.ERROR)
          if reason:
              self.add('reason', reasonf error(self, reason=None):
          '''
          Set the test status to Report.ERROR, and set the error reason
  
          :param reason: error reason (default: None)
          '''
          self.set_status(Report.ERROR)
          if reason:
              self.add('reason', reason)
docs: Set the test status to Report.ERROR, and set the error reason
  
          :param reason: error reason (default: None)