diff pycall.cc @ 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 2e4c9ce0c83c
children 6e83efbcf1bc
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