Commit 1bf8004e authored by Stefan Behnel's avatar Stefan Behnel

test fixes for PyPy

parent 8c8a4ee4
...@@ -7,9 +7,8 @@ def f(obj1, obj2, obj3, obj4): ...@@ -7,9 +7,8 @@ def f(obj1, obj2, obj3, obj4):
True True
>>> l is f(1, l, 2, 3) >>> l is f(1, l, 2, 3)
False False
>>> f(1, 42, 2, 3) #doctest: +ELLIPSIS >>> try: f(1, 42, 2, 3)
Traceback (most recent call last): ... except TypeError: pass
TypeError: ...unsliceable...
""" """
obj1 = obj2[:] obj1 = obj2[:]
return obj1 return obj1
...@@ -18,9 +17,8 @@ def g(obj1, obj2, obj3, obj4): ...@@ -18,9 +17,8 @@ def g(obj1, obj2, obj3, obj4):
""" """
>>> g(1, [1,2,3,4], 2, 3) >>> g(1, [1,2,3,4], 2, 3)
[3, 4] [3, 4]
>>> g(1, 42, 2, 3) #doctest: +ELLIPSIS >>> try: g(1, 42, 2, 3)
Traceback (most recent call last): ... except TypeError: pass
TypeError: ...unsliceable...
""" """
obj1 = obj2[obj3:] obj1 = obj2[obj3:]
return obj1 return obj1
...@@ -29,9 +27,8 @@ def h(obj1, obj2, obj3, obj4): ...@@ -29,9 +27,8 @@ def h(obj1, obj2, obj3, obj4):
""" """
>>> h(1, [1,2,3,4], 2, 3) >>> h(1, [1,2,3,4], 2, 3)
[1, 2, 3] [1, 2, 3]
>>> h(1, 42, 2, 3) #doctest: +ELLIPSIS >>> try: h(1, 42, 2, 3)
Traceback (most recent call last): ... except TypeError: pass
TypeError: ...unsliceable...
""" """
obj1 = obj2[:obj4] obj1 = obj2[:obj4]
return obj1 return obj1
...@@ -40,9 +37,8 @@ def j(obj1, obj2, obj3, obj4): ...@@ -40,9 +37,8 @@ def j(obj1, obj2, obj3, obj4):
""" """
>>> j(1, [1,2,3,4], 2, 3) >>> j(1, [1,2,3,4], 2, 3)
[3] [3]
>>> j(1, 42, 2, 3) #doctest: +ELLIPSIS >>> try: j(1, 42, 2, 3)
Traceback (most recent call last): ... except TypeError: pass
TypeError: ...unsliceable...
""" """
obj1 = obj2[obj3:obj4] obj1 = obj2[obj3:obj4]
return obj1 return obj1
......
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