Lichen

tests/operators.py

323:5159c0d73bbf
2016-12-05 Paul Boddie Added an option to build and run tests, saving their output for inspection.
     1 import operator     2      3 def f(a, op, b):     4     return op(a, b)     5      6 print f(1, operator.add, 2) # 3     7 print f(1, operator.sub, 2) # -1