Commit 71383c16 authored by Stefan Behnel's avatar Stefan Behnel

adapt doctest syntax to make it work in Py3.2 (no 'u' string prefix)

parent a446a4b5
...@@ -9,6 +9,10 @@ class Foo: ...@@ -9,6 +9,10 @@ class Foo:
def baz(self): def baz(self):
return int(1)/int(0) return int(1)/int(0)
unicode_foo = u"foo"
def wrap_hasattr(obj, name): def wrap_hasattr(obj, name):
""" """
>>> wrap_hasattr(None, "abc") >>> wrap_hasattr(None, "abc")
...@@ -17,7 +21,7 @@ def wrap_hasattr(obj, name): ...@@ -17,7 +21,7 @@ def wrap_hasattr(obj, name):
True True
>>> wrap_hasattr(Foo(), "foo") >>> wrap_hasattr(Foo(), "foo")
True True
>>> wrap_hasattr(Foo(), u"foo") >>> wrap_hasattr(Foo(), unicode_foo)
True True
>>> wrap_hasattr(Foo(), "spam") >>> wrap_hasattr(Foo(), "spam")
False False
......
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