Commit d45020f0 authored by Stefan Behnel's avatar Stefan Behnel

minor test cleanup

parent b8ce0ee2
# mode: run
# ticket: 326 # ticket: 326
# tag: hash
__doc__ = u"""
cdef class A:
"""
>>> hash(A(5)) >>> hash(A(5))
5 5
>>> hash(A(-1)) >>> hash(A(-1))
...@@ -12,10 +15,7 @@ __doc__ = u""" ...@@ -12,10 +15,7 @@ __doc__ = u"""
Traceback (most recent call last): Traceback (most recent call last):
... ...
TypeError: That's kind of a round number... TypeError: That's kind of a round number...
"""
"""
cdef class A:
cdef long a cdef long a
def __init__(self, a): def __init__(self, a):
self.a = a self.a = a
...@@ -25,6 +25,7 @@ cdef class A: ...@@ -25,6 +25,7 @@ cdef class A:
else: else:
return self.a return self.a
cpdef long __hash__(long x): cpdef long __hash__(long x):
""" """
>>> __hash__(-1) >>> __hash__(-1)
......
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