diff options
author | Georg Brandl <georg@python.org> | 2010-01-06 18:02:16 +0000 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2010-01-06 18:02:16 +0000 |
commit | 89040530035ee9a8d0b5ae34c6e73b80fafa4307 (patch) | |
tree | 1fe0036448828f6d1f2a2f92323828eaa2fb136f /Lib/test/test_cmd.py | |
parent | 5089a38af2b90dfe51bbf157ff38227c85eff687 (diff) | |
download | cpython-git-89040530035ee9a8d0b5ae34c6e73b80fafa4307.tar.gz |
#5991: let completion for the "help" command include help topics.
This also simplifies the Cmd.get_names() method implementation; it was written
at a time where dir() didn't consider base class attributes.
Diffstat (limited to 'Lib/test/test_cmd.py')
-rw-r--r-- | Lib/test/test_cmd.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/test_cmd.py b/Lib/test/test_cmd.py index 8898a32cb9..2ee5cef472 100644 --- a/Lib/test/test_cmd.py +++ b/Lib/test/test_cmd.py @@ -57,15 +57,17 @@ class samplecmdclass(cmd.Cmd): >>> mycmd.completenames("12") [] >>> mycmd.completenames("help") - ['help', 'help'] + ['help'] Test for the function complete_help(): >>> mycmd.complete_help("a") ['add'] >>> mycmd.complete_help("he") - ['help', 'help'] + ['help'] >>> mycmd.complete_help("12") [] + >>> sorted(mycmd.complete_help("")) + ['add', 'exit', 'help', 'shell'] Test for the function do_help(): >>> mycmd.do_help("testet") |