# HG changeset patch # User Abhinav Tripathi # Date 1469993355 25200 # Node ID b06df69f4b37ff18ff9765e86e8c09514b541cf2 # Parent 3bf799e80ca5110df2871bf955c8b6eda09a862f Remove unused code and add tests to pycall * pycall.cc: Cleanup unused code and add tests to verify conversion of lists, dicts and tuples to pyobject diff -r 3bf799e80ca5 -r b06df69f4b37 pycall.cc --- a/pycall.cc Fri Jul 29 20:15:39 2016 -0700 +++ b/pycall.cc Sun Jul 31 12:29:15 2016 -0700 @@ -203,11 +203,6 @@ break; } - object hex_function = builtins_module.attr ("hex"); - object id_function = builtins_module.attr ("id"); - object idtmp = hex_function (id_function (res)); - id = extract (idtmp); - // Ensure reasonable "ans" behaviour, consistent with Python's "_". if (nargout > 0 || ! res.is_none ()) { @@ -242,6 +237,9 @@ %!assert (pycall ("cmath.sqrt", 2j), sqrt (2j)) %!assert (pycall ("int", 10.2), 10) %!assert (isa (pycall ("object"), "pyobject")) +%!assert (isa (pycall ("dict"), "pyobject")) +%!assert (isa (pycall ("list"), "pyobject")) +%!assert (isa (pycall ("tuple"), "pyobject")) ## Test argument type conversion of values into Python %!test