validator no longer raise exception it returns the return code and the testcase assert it

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/branches/dogtail@16396 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Ahmed Sayed
2007-08-06 22:42:34 +00:00
parent d369b4f00e
commit 1d602c6644

View File

@@ -22,14 +22,7 @@ def validate_node (node, testname, ref_filename=None, act_filename=None):
act_file.close()
# get divided 265 to get the exact system status
error_code = os.system("diff %s %s" % (act_filename, ref_filename))/256
if error_code == EXIT_SUCCESS:
return
elif error_code == EXIT_FAILURE:
raise Exception('Exit Failure: Refernece file not match the act file')
elif error_code == EXIT_TROUBLE:
raise Exception('Exit Trouble: Reference file not found')
else:
raise Exception('Unknown Error')
return error_code
def generate_act_file (node, file, depth = 0):
""" helper method that Generate the act file, The file Generated in the testcase """