Mercurial > pytave
changeset 263:0fc1a58d7e89
Delete unnecessary newlines in one-line function definitions
* pycall.cc, pyeval.cc: Delete unnecessary newlines in definitions of
one-line Python functions in unit tests.
author | Mike Miller <mtmiller@octave.org> |
---|---|
date | Fri, 29 Jul 2016 12:25:21 -0700 |
parents | 0a8983533192 |
children | 15666fdcbb45 |
files | pycall.cc pyeval.cc |
diffstat | 2 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/pycall.cc Fri Jul 29 10:51:15 2016 -0700 +++ b/pycall.cc Fri Jul 29 12:25:21 2016 -0700 @@ -278,11 +278,11 @@ %! endfor %!error <argument type conversion> -%! pyexec ("def intwrapper(x):\n return int(x)\n"); +%! pyexec ("def intwrapper(x): return int(x)"); %! pycall ("intwrapper", ftp ()); %!test -%! pyexec ("def pyfunc(x):\n return 2*x"); +%! pyexec ("def pyfunc(x): return 2*x"); %! z = pycall ("pyfunc", [20 20]); %! assert (z, [40 40]) @@ -296,7 +296,7 @@ %! assert (pycall ("pyfunc", 10), 10) %!error <NameError> -%! pyexec ("def raiseException ():\n raise NameError ('oops')") +%! pyexec ("def raiseException(): raise NameError('oops')") %! pycall ("raiseException") ## None as a return value
--- a/pyeval.cc Fri Jul 29 10:51:15 2016 -0700 +++ b/pyeval.cc Fri Jul 29 12:25:21 2016 -0700 @@ -155,6 +155,6 @@ %! assert (z{4}{2}{2}, 422) %!error <NameError> -%! pyexec ("def raiseException ():\n raise NameError ('oops')") -%! pyeval ("raiseException ()") +%! pyexec ("def raiseException(): raise NameError ('oops')") +%! pyeval ("raiseException()") */