summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xmonkey/test.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/monkey/test.py b/monkey/test.py
index 4b0d192..b75858a 100755
--- a/monkey/test.py
+++ b/monkey/test.py
@@ -7,12 +7,11 @@ import sys
import django
from termcolor import colored
-from .action import parse
-from .edits import classify_edits, trace_graph, get_edits_from_traces
+from .edits import classify_edits, trace_graph
from .graph import graphviz
from .monkey import fix
from prolog.engine import test
-from prolog.util import Token, compose, decompose, stringify
+from prolog.util import compose, decompose, stringify
from .util import indent
# Load django models.
@@ -112,9 +111,8 @@ elif len(sys.argv) >= 3 and sys.argv[2] == 'info':
print(' {:.4f}\t{}'.format(cost, stringify(before)))
print('Changes')
for (before, after), cost in sorted(changes.items(), key=lambda x: x[1]):
- print(' {:.4f}\t{} → {}'.format(cost,
- stringify(before if before else [Token('INVALID', 'ε')]),
- stringify(after if after else [Token('INVALID', 'ε')])))
+ print(' {:.4f}\t{} → {}'.format(cost, stringify(before) if before else 'ε',
+ stringify(after) if after else 'ε'))
# Print all student submissions not (yet) corrected.
elif sys.argv[3] == 'unsolved':
for p in sorted(incorrect):
@@ -143,7 +141,7 @@ elif len(sys.argv) == 4 and sys.argv[2] == 'graph':
def node_attr(node):
if node.ein and node.data[2] == node.ein[0].data[2]:
- return 'color="gray", shape="point"'
+ return 'shape="point"'
return ''
def edge_attr(a, b):