diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2017-09-26 11:12:43 +0100 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2017-09-26 11:12:43 +0100 |
commit | bc4a6ebee99b4f29b53a6c664dfa9b5d4ba58fbf (patch) | |
tree | ac8a2815b3d19ea22eaf4e5a85304de37bf76530 /cherrypy/lib/httputil.py | |
parent | 5ed56f9eeb536a501331b29b0622bb09695946cd (diff) | |
download | cherrypy-git-bc4a6ebee99b4f29b53a6c664dfa9b5d4ba58fbf.tar.gz |
Convert doc to doctest
Diffstat (limited to 'cherrypy/lib/httputil.py')
-rw-r--r-- | cherrypy/lib/httputil.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cherrypy/lib/httputil.py b/cherrypy/lib/httputil.py index a3c9c769..fdb34ebe 100644 --- a/cherrypy/lib/httputil.py +++ b/cherrypy/lib/httputil.py @@ -239,7 +239,12 @@ def header_elements(fieldname, fieldvalue): # noqa: E302 def decode_TEXT(value): - r"""Decode :rfc:`2047` TEXT (e.g. "=?utf-8?q?f=C3=BCr?=" -> "f\xfcr").""" + r""" + Decode :rfc:`2047` TEXT + + >>> decode_TEXT("=?utf-8?q?f=C3=BCr?=") == b'f\xfcr'.decode('latin-1') + True + """ atoms = decode_header(value) decodedvalue = '' for atom, charset in atoms: |