# HG changeset patch # User Jeff Hammel # Date 1306505957 25200 # Node ID d50d5237e82d5f611e16747f7ca9c970d6b44269 # Parent ff272dcd5cd832749c3a9ce1b4b8633d89ec50b8 rename test file diff -r ff272dcd5cd8 -r d50d5237e82d tests/doctest.txt --- a/tests/doctest.txt Fri May 27 07:02:27 2011 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ -Test pyloader -============= - -Test the call method:: - - >>> from pyloader.invoke import call - >>> options = {'badarg': 'bar', 'a': 7, 'b': 9, 'c': 10} - >>> def foo(a, b=1, c=2): - ... return a + 10*b + 100*c - >>> foo(7, 9, 10) - 1097 - -You can't call methods with bad arguments OOTB in python:: - - >>> error = None - >>> try: - ... foo(**options) - ... except TypeError, e: - ... error = e - >>> type(error) - - -But you can with call:: - - >>> call(foo, **options) - 1097 diff -r ff272dcd5cd8 -r d50d5237e82d tests/test_call.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test_call.txt Fri May 27 07:19:17 2011 -0700 @@ -0,0 +1,26 @@ +Test call +========= + +Test the call method:: + + >>> from pyloader.invoke import call + >>> options = {'badarg': 'bar', 'a': 7, 'b': 9, 'c': 10} + >>> def foo(a, b=1, c=2): + ... return a + 10*b + 100*c + >>> foo(7, 9, 10) + 1097 + +You can't call methods with bad arguments OOTB in python:: + + >>> error = None + >>> try: + ... foo(**options) + ... except TypeError, e: + ... error = e + >>> type(error) + + +But you can with call:: + + >>> call(foo, **options) + 1097