# HG changeset patch # User Colin Macdonald # Date 1508962613 25200 # Node ID 750a86973625ce493e7537448d3da902b973f06e # Parent 8a26a4e649ba840a0dd8141854ceaa91eafe56fa Update doctests for display changes The output of display was recently improved by commit 24546b7021db2ab2553357f691450144c6c5ab50 but the doctests were not updated. * @pyobject/dummy.m, @pyobject/cell.m, @pyobject/display.m: update doctests. * pyargs.m: update doctests. diff -r 8a26a4e649ba -r 750a86973625 @pyobject/cell.m --- a/@pyobject/cell.m Wed Feb 21 16:12:39 2018 -0800 +++ b/@pyobject/cell.m Wed Oct 25 13:16:53 2017 -0700 @@ -28,7 +28,7 @@ ## @example ## @group ## L = pyeval ("[10.0, 20.0, 'hello']") -## @result{} L = [pyobject ...] +## @result{} L = [Python object of type list] ## ## [10.0, 20.0, 'hello'] ## @end group @@ -37,12 +37,14 @@ ## However, we can convert the list to a cell array: ## @example ## @group +## @c TODO: display of cell array in flux: savannah.gnu.org/bugs/?50756 +## @c doctest: +XFAIL ## C = cell (L) ## @result{} C = ## @{ ## [1,1] = 10 ## [1,2] = 20 -## = [pyobject ...] +## [1,3] = [Python object of type str] ## ## hello ## @} @@ -52,13 +54,15 @@ ## The conversion is not recursive, in the following sense: ## @example ## @group +## @c TODO: display of cell array in flux: savannah.gnu.org/bugs/?50756 +## @c doctest: +XFAIL ## L = pyeval ("[10.0, 20.0, [33.0, 44.0], 50.0]"); ## C = cell (L) ## @result{} C = ## @{ ## [1,1] = 10 ## [1,2] = 20 -## = [pyobject ...] +## [1,3] = [Python object of type list] ## ## [33.0, 44.0] ## diff -r 8a26a4e649ba -r 750a86973625 @pyobject/display.m --- a/@pyobject/display.m Wed Feb 21 16:12:39 2018 -0800 +++ b/@pyobject/display.m Wed Oct 25 13:16:53 2017 -0700 @@ -26,7 +26,7 @@ ## @group ## pyexec ("import sys") ## sysmodule = pyeval ("sys") -## @result{} sysmodule = [pyobject ...] +## @result{} sysmodule = [Python object of type module] ## ## ## diff -r 8a26a4e649ba -r 750a86973625 @pyobject/dummy.m --- a/@pyobject/dummy.m Wed Feb 21 16:12:39 2018 -0800 +++ b/@pyobject/dummy.m Wed Oct 25 13:16:53 2017 -0700 @@ -34,7 +34,7 @@ ## @example ## @group ## g = pyobject (int32 (6)) -## @result{} g = [pyobject ...] +## @result{} g = [Python object of type int] ## ## 6 ## @@ -67,7 +67,7 @@ ## @group ## pyexec ("d = dict(two=2)") ## x = pyeval ("d") -## @result{} x = [pyobject ...] +## @result{} x = [Python object of type dict] ## @{'two': 2@} ## ## # oops, overwrote d in Python: @@ -75,7 +75,7 @@ ## ## # but have no fear, we still have a reference to it: ## x -## @result{} x = [pyobject ...] +## @result{} x = [Python object of type dict] ## @{'two': 2@} ## @end group ## @end example @@ -91,7 +91,7 @@ ## @example ## @group ## x -## @result{} x = [pyobject ...] +## @result{} x = [Python object of type dict] ## @{@} ## @end group ## @end example @@ -103,7 +103,7 @@ ## @group ## pyexec ("import sys") ## sysmodule = pyeval ("sys") -## @result{} sysmodule = [pyobject ...] +## @result{} sysmodule = [Python object of type module] ## ## @end group ## @end example @@ -121,7 +121,7 @@ ## @example ## @group ## L = pyeval ("[42.0, 'hello', sys]") -## @result{} L = [pyobject ...] +## @result{} L = [Python object of type list] ## [42.0, 'hello', ] ## @end group ## @end example @@ -136,13 +136,15 @@ ## or if needed, the list can be converted to a cell array: ## @example ## @group +## @c TODO: display of cell array in flux: savannah.gnu.org/bugs/?50756 +## @c doctest: +XFAIL ## cell (L) ## @result{} ans = ## @{ ## [1,1] = 42 -## = [pyobject ...] +## [1,2] = [Python object of type str] ## hello -## = [pyobject ...] +## [1,3] = [Python object of type module] ## ## @} ## @end group diff -r 8a26a4e649ba -r 750a86973625 pyargs.m --- a/pyargs.m Wed Feb 21 16:12:39 2018 -0800 +++ b/pyargs.m Wed Oct 25 13:16:53 2017 -0700 @@ -30,7 +30,7 @@ ## @example ## @group ## py.dict (pyargs ("one", 1, "two", 2)) -## @result{} [pyobject ...] +## @result{} [Python object of type dict] ## @{...@} ## sort (cellfun (@@char, cell (py.list (ans.keys ())), "uniformoutput", false)) ## @result{} @@ -48,7 +48,7 @@ ## x = py.list (num2cell (int32 ([1, 2, 3]))); ## x.sort (pyargs ("reverse", true)); ## x -## @result{} x = [pyobject ...] +## @result{} x = [Python object of type list] ## [3, 2, 1] ## @end group ## @end example