aboutsummaryrefslogtreecommitdiffstats
path: root/libbe
diff options
context:
space:
mode:
authorAaron Bentley <abentley@panoramicfeedback.com>2005-05-17 19:58:30 +0000
committerAaron Bentley <abentley@panoramicfeedback.com>2005-05-17 19:58:30 +0000
commite77fb4d6b952a69b692155c20f4ff248266944a1 (patch)
tree4a1da0610afe2efb1edc7c91970d3912a7b0a6b0 /libbe
parent336a51ada68f4d30684bed29df155ec73fbd7375 (diff)
downloadbugseverywhere-e77fb4d6b952a69b692155c20f4ff248266944a1.tar.gz
Added tests for missing $EDITOR
Modified bug reports: ecc: no tests for missing $EDITOR status: open -> closed
Diffstat (limited to 'libbe')
-rw-r--r--libbe/utility.py12
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: