diff options
author | Bram Moolenaar <Bram@vim.org> | 2013-05-29 22:36:10 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2013-05-29 22:36:10 +0200 |
commit | dd8aca664d9768614d18cebec84badc3ecad3af5 (patch) | |
tree | 6002f0821e725f7829f73bc05336f4fc4ca376a3 /src/testdir/test86.in | |
parent | 432b09c84dc6daf0b7ca8dac986bc0b1faf899d7 (diff) | |
download | vim-git-dd8aca664d9768614d18cebec84badc3ecad3af5.tar.gz |
updated for version 7.3.1047v7.3.1047
Problem: Python: dir() does not work properly.
Solution: Python patch 8. Add __dir__ method to all objects with custom
tp_getattr supplemented by __members__ attribute for at least
python-2* versions. __members__ is not mentioned in python-3*
dir() output even if it is accessible. (ZyX)
Diffstat (limited to 'src/testdir/test86.in')
-rw-r--r-- | src/testdir/test86.in | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/testdir/test86.in b/src/testdir/test86.in index 267657c0a..45c345f29 100644 --- a/src/testdir/test86.in +++ b/src/testdir/test86.in @@ -691,6 +691,24 @@ for expr, attr in ( cb.append(expr + ':' + attr + ':' + repr(type(eval(expr)) is getattr(vim, attr))) EOF :" +:" Test __dir__() method +py << EOF +for name, o in ( + ('current', vim.current), + ('buffer', vim.current.buffer), + ('window', vim.current.window), + ('tabpage', vim.current.tabpage), + ('range', vim.current.range), + ('dictionary', vim.bindeval('{}')), + ('list', vim.bindeval('[]')), + ('function', vim.bindeval('function("tr")')), + ('output', sys.stdout), + ): + cb.append(name + ':' + ','.join(dir(o))) +del name +del o +EOF +:" :" Test exceptions :fun Exe(e) : execute a:e |