True
>>> comment.in_reply_to is None
True
+ >>> del os.environ["EDITOR"]
+ >>> execute(["b"])
+ Traceback (most recent call last):
+ UserError: No comment supplied, and EDITOR not specified.
>>> os.environ["EDITOR"] = "echo 'I like cheese' > "
>>> execute(["b"])
>>> dir.get_bug("b").list_comments()[0].body
Exception.__init__(self, "Can't find editor to get string from")
def editor_string():
- """Invokes the editor, and returns the user_produced text as a string"""
+
+ """Invokes the editor, and returns the user_produced text as a string
+
+ >>> del os.environ["EDITOR"]
+ >>> editor_string()
+ Traceback (most recent call last):
+ CantFindEditor: Can't find editor to get string from
+ >>> os.environ["EDITOR"] = "echo bar > "
+ >>> editor_string()
+ 'bar\\n'
+ """
try:
editor = os.environ["EDITOR"]
except KeyError: