summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Douard <david.douard@logilab.fr>2014-09-01 12:24:58 +0200
committerDavid Douard <david.douard@logilab.fr>2014-09-01 12:24:58 +0200
commit381fe9c73ff45b5bb958e55b67880fd2c0f766e8 (patch)
tree6b045f60f9999b342e55be51779f34e2e84c3062
parent8461e48946de409588a7a88fa11eb099128fa632 (diff)
downloadlogilab-common-381fe9c73ff45b5bb958e55b67880fd2c0f766e8.tar.gz
[test] fix text_to_dict doctest (closes #174440)
-rw-r--r--textutils.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/textutils.py b/textutils.py
index f55c004..9046f97 100644
--- a/textutils.py
+++ b/textutils.py
@@ -284,11 +284,14 @@ def text_to_dict(text):
dict of {'key': 'value'}. When the same key is encountered multiple time,
value is turned into a list containing all values.
- >>> text_to_dict('''multiple=1
+ >>> d = text_to_dict('''multiple=1
... multiple= 2
... single =3
... ''')
- {'single': '3', 'multiple': ['1', '2']}
+ >>> d['single']
+ '3'
+ >>> d['multiple']
+ ['1', '2']
"""
res = {}