Assorted bug target manipulations and queries
>>> import os, StringIO, sys
>>> import libbe.bugdir
>>> bd = libbe.bugdir.SimpleBugDir(memory=False)
>>> io = libbe.command.StringInputOutput()
>>> io.stdout = sys.stdout
>>> ui = libbe.command.UserInterface(io=io)
>>> ui.storage_callbacks.set_storage(bd.storage)
>>> cmd = Target(ui=ui)
>>> ret = ui.run(cmd, args=['/a'])
No target assigned.
>>> ret = ui.run(cmd, args=['/a', 'tomorrow'])
>>> ret = ui.run(cmd, args=['/a'])
tomorrow
>>> ui.io.stdout = StringIO.StringIO()
>>> ret = ui.run(cmd, {'resolve':True}, ['tomorrow'])
>>> output = ui.io.get_stdout().strip()
>>> bd.flush_reload()
>>> target = bd.bug_from_uuid(output)
>>> print target.summary
tomorrow
>>> print target.severity
target
>>> ui.io.stdout = sys.stdout
>>> ret = ui.run(cmd, args=['/a', 'none'])
>>> ret = ui.run(cmd, args=['/a'])
No target assigned.
>>> ui.cleanup()
>>> bd.cleanup()
Methods
cleanup() | |
complete([argument, fragment]) | |
help(*args) | |
run([options, args]) | |
usage() |
List possible command completions for fragment.
Return a dict with bug UUID keys and bug summary values for all target bugs.
Generate all possible target bug summaries.