You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are several negative testings which are expected to fail, which looks so bad in the test report, it would be better to turn them into GOOD result.
suggest to split error_check into no_error_found and error_found:
for normal testing, skip the error_found method, maybe add it into default config file is a good idea.
for negative testing, skip the no_error_found method when call OutputGood.
@staticmethod
def no_error_found(output):
"""
Return False if Go panic string found in output
:param output: Stripped output string
:return: True if Go panic pattern **not** found
"""
regex = re.compile(r'\s*panic:\s*.+error.*')
for line in output.splitlines():
if bool(regex.search(line.strip())):
return False # panic message found
return True # panic message not found
@staticmethod
def error_found(output):
"""
Return True if Go panic string found in output
:param output: Stripped output string
:return: False if Go panic pattern **not** found
"""
regex = re.compile(r'\s*panic:\s*.+error.*')
for line in output.splitlines():
if bool(regex.search(line.strip())):
return True # panic message found
return False # panic message not found
The text was updated successfully, but these errors were encountered:
There are several negative testings which are expected to fail, which looks so bad in the test report, it would be better to turn them into GOOD result.
suggest to split error_check into no_error_found and error_found:
for normal testing, skip the error_found method, maybe add it into default config file is a good idea.
for negative testing, skip the no_error_found method when call OutputGood.
The text was updated successfully, but these errors were encountered: