Commit e36ec6c2 authored by Stefan Behnel's avatar Stefan Behnel

extend test

parent 74d42469
# mode: run
from cpython.version cimport PY_MAJOR_VERSION from cpython.version cimport PY_MAJOR_VERSION
...@@ -15,4 +16,28 @@ def test_one_arg_indexing(s): ...@@ -15,4 +16,28 @@ def test_one_arg_indexing(s):
""" """
cfunc(s[0]) cfunc(s[0])
z = cfunc(s[2]) z = cfunc(s[2])
assert z == 'z', repr(z)
return cfunc(s[1]) return cfunc(s[1])
'''
# FIXME: should these be allowed?
def test_one_arg_slicing(s):
"""
>>> test_one_arg_indexing(b'xyz')
'y'
"""
cfunc(s[:2])
z = cfunc(s[2:])
assert z == 'z', repr(z)
return cfunc(s[1:2])
def test_one_arg_adding(s):
"""
>>> test_one_arg_adding(b'xyz')
'abxyzqr'
"""
return cfunc(b"a" + b"b" + s + b"q" + b"r")
'''
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