True
>>> execute(("a", "someone"))
>>> dir.get_bug("a").assigned
- 'someone'
+ u'someone'
>>> execute(("a","none"))
>>> dir.get_bug("a").assigned is None
True
>>> dir = tests.simple_bug_dir()
>>> os.chdir(dir.dir)
>>> dir.get_bug("a").status
- 'open'
+ u'open'
>>> execute(("a",))
>>> dir.get_bug("a").status
- 'closed'
+ u'closed'
>>> tests.clean_up()
"""
assert(len(args) == 1)
>>> execute(["a", "This is a comment about a"])
>>> comment = dir.get_bug("a").list_comments()[0]
>>> comment.body
- 'This is a comment about a\\n'
+ u'This is a comment about a\\n'
>>> comment.From == names.creator()
True
>>> comment.date <= int(time.time())
>>> os.environ["EDITOR"] = "echo 'I like cheese' > "
>>> execute(["b"])
>>> dir.get_bug("b").list_comments()[0].body
- 'I like cheese\\n'
+ u'I like cheese\\n'
>>> tests.clean_up()
"""
options, args = get_parser().parse_args(args)
>>> dir = tests.simple_bug_dir()
>>> os.chdir(dir.dir)
>>> dir.get_bug("a").status
- 'open'
+ u'open'
>>> execute(("a",))
>>> dir.get_bug("a").status
- 'in-progress'
+ u'in-progress'
>>> tests.clean_up()
"""
assert(len(args) == 1)
Created bug with ID a
>>> bug = list(dir.list())[0]
>>> bug.summary
- 'this is a test'
+ u'this is a test'
>>> bug.creator = os.environ["LOGNAME"]
>>> bug.time <= int(time.time())
True
>>> bug.severity
- 'minor'
+ u'minor'
>>> bug.target == None
True
>>> tests.clean_up()
>>> dir = tests.simple_bug_dir()
>>> os.chdir(dir.dir)
>>> dir.get_bug("b").status
- 'closed'
+ u'closed'
>>> execute(("b",))
>>> dir.get_bug("b").status
- 'open'
+ u'open'
>>> tests.clean_up()
"""
assert(len(args) == 1)
"""
Parse a format-2 mapfile.
>>> parse('\\n\\n\\nq=p\\n\\n\\n\\n')['q']
- 'p'
+ u'p'
>>> parse('\\n\\nq=\\'p\\'\\n\\n\\n\\n')['q']
- "\'p\'"
+ u"\'p\'"
>>> f = utility.FileString()
>>> generate(f, {"a":"b", "c":"d", "e":"f"})
>>> dict = parse(f)
>>> dict["a"]
- 'b'
+ u'b'
>>> dict["c"]
- 'd'
+ u'd'
>>> dict["e"]
- 'f'
+ u'f'
"""
f = utility.get_file(f)
result = {}