-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlispytest.diff
26 lines (25 loc) · 1.03 KB
/
lispytest.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
--- lispytest.py.orig 2014-06-24 13:06:47.030235600 -0400
+++ lispytest.py 2014-06-19 11:34:15.793991700 -0400
@@ -103,19 +103,18 @@
for (x, expected) in tests:
try:
result = eval(parse(x))
- print x, '=>', to_string(result)
+ print(x, '=>', to_string(result))
ok = (result == expected)
except Exception as e:
- print x, '=raises=>', type(e).__name__, e
+ print(x, '=raises=>', type(e).__name__, e)
ok = issubclass(expected, Exception) and isinstance(e, expected)
if not ok:
fails += 1
- print 'FAIL!!! Expected', expected
- print '%s %s: %d out of %d tests fail.' % ('*'*45, name, fails, len(tests))
+ print('FAIL!!! Expected', expected)
+ print('%s %s: %d out of %d tests fail.' % ('*'*45, name, fails, len(tests)))
if __name__ == '__main__':
from lis import *
test(lis_tests, 'lis.py')
from lispy import *
test(lis_tests+lispy_tests, 'lispy.py')
-