Commit 17d62ebc by Chris Jerdonek

Changed the lone doctest to pass using "nosetests --with-doctest".

Apparently, nosetests runs doctests without the doctest.ELLIPSIS
option enabled.  This caused the Modifiers.set() test to fail.
parent 6323e1cf
...@@ -28,11 +28,13 @@ class Modifiers(dict): ...@@ -28,11 +28,13 @@ class Modifiers(dict):
Return a decorator that assigns the given function to the given key. Return a decorator that assigns the given function to the given key.
>>> modifiers = Modifiers() >>> modifiers = Modifiers()
>>>
>>> @modifiers.set('P') >>> @modifiers.set('P')
... def render_tongue(self, tag_name=None, context=None): ... def render_tongue(tag_name, context):
... return ":P %s" % tag_name ... return "%s :P" % context.get(tag_name)
>>> modifiers >>>
{'P': <function render_tongue at 0x...>} >>> modifiers['P']('text', {'text': 'hello!'})
'hello! :P'
""" """
def decorate(func): def decorate(func):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment