X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=inline;f=t%2Ftest.py;h=26d1a29e4b9bc7abf9b53f9a7adc4c487326ca83;hb=b07a7c4bf08db2928e1845c4e60798f7c9ad8b65;hp=07a220fe96a51bb7e11e96abc46341ab2ae43d55;hpb=a609f96f445c9d27420fa54a13eb7e587f1bd560;p=moe.git diff --git a/t/test.py b/t/test.py index 07a220f..26d1a29 100755 --- a/t/test.py +++ b/t/test.py @@ -9,6 +9,7 @@ import moe.log import moe.eval import moe.pipeline import moe.batch +import os e = moe.eval.Eval() @@ -17,9 +18,9 @@ try: e.builtins.set("HOME", ".") e.builtins.set("TASK", "sum") e.builtins.set("CONTESTANT", "mj") - e.log.progress("### Evaluating task %s of contestant %s ###\n\n" % (e.cfgs['TASK'], e.cfgs['CONTESTANT'])) + e.log.progress("### Evaluating task %s of contestant %s ###\n\n" % (e['TASK'], e['CONTESTANT'])) e.init(overrides) -except moe.MoeErr, err: +except moe.MoeError, err: e.log.shout("FATAL: %s\n" % err) sys.exit(1) @@ -30,12 +31,14 @@ try: file = None moe.batch.locate(e, file) e.run() -except moe.MoeErr, err: +except moe.MoeError, err: e.log.shout("FATAL: %s\n" % err) sys.exit(1) -except moe.SolutionErr, err: +except moe.SolutionError, err: e.stat["error"] = err e.log.shout("%s\n" % err) +except Exception: + moe.log.fatal_exception() moe.log.default.progress_file.write("\nFinal status file:\n") e.stat.write(file=moe.log.default.progress_file)