]> mj.ucw.cz Git - moe.git/blobdiff - t/test.py
Several changes in status.py, wrote docs
[moe.git] / t / test.py
index e928214ac5b7904c61b3c3ad20423f17f1f27dab..cc61e9986713cfa5929ababf35f6611e69158dc1 100755 (executable)
--- a/t/test.py
+++ b/t/test.py
@@ -1,10 +1,21 @@
 #!/usr/bin/env python
 
 import sys
-sys.path.append('.')
+#sys.path.append('.')
 
-import moe.meta
+import moe.eval
+import os
 
-m = moe.meta.MoeMeta()
-m['a'] = '1'
-m.write()
+e = moe.eval.Eval()
+try:
+    e.init(['TASK = "sum"; CONTESTANT = "mj"; SOURCE = "som_sol.c"; VERBOSE = "2"'] + sys.argv[1:])
+    e.log.debug("### Evaluating task %s of contestant %s ###\n\n" % (e['TASK'], e['CONTESTANT']))
+    try:
+       e.run()
+    except moe.SolutionError, err: # Why are we catching this?
+       e.status["error"] = err
+       e.log.user.error(err)
+       e.log.exception()
+except:
+    e.log.exception("Moe fatal error")
+    sys.exit(1)