diff options
Diffstat (limited to 'becommands/new.py')
-rw-r--r-- | becommands/new.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/becommands/new.py b/becommands/new.py index af599d7..a8ee2ec 100644 --- a/becommands/new.py +++ b/becommands/new.py @@ -19,16 +19,16 @@ from libbe import cmdutil, bugdir import sys __desc__ = __doc__ -def execute(args, test=False): +def execute(args, manipulate_encodings=True): """ >>> import os, time >>> from libbe import bug - >>> bd = bugdir.simple_bug_dir() + >>> bd = bugdir.SimpleBugDir() >>> os.chdir(bd.root) >>> bug.uuid_gen = lambda: "X" - >>> execute (["this is a test",], test=True) + >>> execute (["this is a test",], manipulate_encodings=False) Created bug with ID X - >>> bd.load() + >>> bd._clear_bugs() >>> bug = bd.bug_from_uuid("X") >>> print bug.summary this is a test @@ -38,13 +38,15 @@ def execute(args, test=False): minor >>> bug.target == None True + >>> bd.cleanup() """ parser = get_parser() options, args = parser.parse_args(args) cmdutil.default_complete(options, args, parser) if len(args) != 1: raise cmdutil.UsageError("Please supply a summary message") - bd = bugdir.BugDir(from_disk=True, manipulate_encodings=not test) + bd = bugdir.BugDir(from_disk=True, + manipulate_encodings=manipulate_encodings) if args[0] == '-': # read summary from stdin summary = sys.stdin.readline() else: |