Commit e1e15520 authored by Stefan Behnel's avatar Stefan Behnel

fix syntax in test for old Py3 versions

parent 0a56879d
...@@ -109,27 +109,6 @@ def binop_bool(): ...@@ -109,27 +109,6 @@ def binop_bool():
return plus1, pmix1, minus1, and1, or1, ormix1, xor1, plus3, pmix3, minus3, and3, or3, ormix3, xor3 return plus1, pmix1, minus1, and1, or1, ormix1, xor1, plus3, pmix3, minus3, and3, or3, ormix3, xor3
@cython.test_fail_if_path_exists(
"//ReturnStatNode//AddNode",
)
@cython.test_assert_path_exists(
"//ListNode//AddNode",
)
def add_strings():
"""
>>> u, b, rest = add_strings()
>>> u == 'abcdef' or u
True
>>> b == b'abcdef' or b
True
>>> rest
1
"""
a = ["abc" + "def"] # not currently optimised
# FIXME: test encodings and unicode escapes
return u"abc" + u"def", b"abc" + b"def", a[0] and 1
@cython.test_fail_if_path_exists( @cython.test_fail_if_path_exists(
"//SliceIndexNode", "//SliceIndexNode",
) )
......
...@@ -98,3 +98,24 @@ def for_in_empty_setcomp(): ...@@ -98,3 +98,24 @@ def for_in_empty_setcomp():
0 0
""" """
return {i for i in []} return {i for i in []}
@cython.test_fail_if_path_exists(
"//ReturnStatNode//AddNode",
)
@cython.test_assert_path_exists(
"//ListNode//AddNode",
)
def add_strings():
"""
>>> u, b, rest = add_strings()
>>> u == 'abcdef' or u
True
>>> b == b'abcdef' or b
True
>>> rest
1
"""
a = ["abc" + "def"] # not currently optimised
# FIXME: test encodings and unicode escapes
return u"abc" + u"def", b"abc" + b"def", a[0] and 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