File "/home/abentley/be/libbe/cmdutil.py", line 60, in get_command
raise UserError("Unknown command %s" % command_name)
UserError: Unknown command asdf
- >>> get_command("list")
- <module 'becommands.list' from '/home/abentley/be/becommands/list.pyc'>
+ >>> repr(get_command("list")).startswith("<module 'becommands.list' from ")
+ True
"""
cmd = plugin.get_plugin("becommands", command_name.replace("-", "_"))
if cmd is None:
"""
>>> get_plugin("becommands", "asdf") is None
True
- >>> get_plugin("becommands", "list")
- <module 'becommands.list' from '/home/abentley/be/becommands/list.pyc'>
+ >>> q = repr(get_plugin("becommands", "list"))
+ >>> q.startswith("<module 'becommands.list' from ")
+ True
"""
dirprefix = '/'.join(prefix.split('.'))
command_path = os.path.join(plugin_path, dirprefix, name+".py")