diff options
Diffstat (limited to 'libbe')
-rw-r--r-- | libbe/utility.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/libbe/utility.py b/libbe/utility.py index a31d5d8..3d805cd 100644 --- a/libbe/utility.py +++ b/libbe/utility.py @@ -99,7 +99,17 @@ class CantFindEditor(Exception): 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: |