Quickfix:

Fixed a check for test result which yielded false test failures.
This commit is contained in:
Timofey 2015-07-29 11:15:49 +03:00 committed by Alex Zolotarev
parent bb93d92aab
commit be7dd9bc59

View file

@ -149,7 +149,7 @@ class TestRunner:
def log_exec_file(self, filename, result=None):
logstring = ("END" if result else "BEGIN")
logstring = "BEGIN" if result is None else "END" #can be 0 or None. If we omit the explicit check for None, we get wrong result
resstring = (" | result: {returncode}".format(returncode=result) if result else "")
with open(self.logfile, "a") as logf:
logf.write("\n{logstring}: {filename}{resstring}\n".format(logstring=logstring, filename=filename, resstring=resstring))