Modify unit tests to distinguish between FAIL and ERROR. Move comparison utilities into our derived unit test class.

This commit is contained in:
mguthaus
2018-01-31 11:48:41 -08:00
parent 1175f515c8
commit 4aee700331
11 changed files with 121 additions and 123 deletions
+3 -4
View File
@@ -14,14 +14,13 @@ def check(check,str):
index) = inspect.getouterframes(inspect.currentframe())[1]
if not check:
print("ERROR: file {0}: line {1}: {2}".format(os.path.basename(filename),line_number,str))
sys.exit(-1)
assert 0
def error(str,return_value=None):
def error(str,return_value):
(frame, filename, line_number, function_name, lines,
index) = inspect.getouterframes(inspect.currentframe())[1]
print("ERROR: file {0}: line {1}: {2}".format(os.path.basename(filename),line_number,str))
if return_value:
sys.exit(return_value)
assert return_value==0
def warning(str):
(frame, filename, line_number, function_name, lines,