tests: Add test for evaluation order of dictionary key/value pairs.
In Python 3.4 the value is evaluated before the key. In Python 3.5 it's key then value.
This commit is contained in:
parent
9f5f156b9d
commit
4fb5ff86ee
@ -9,6 +9,9 @@ def print_ret(x):
|
|||||||
return x
|
return x
|
||||||
f4(*print_ret(['a', 'b']), kw_arg=print_ret(None))
|
f4(*print_ret(['a', 'b']), kw_arg=print_ret(None))
|
||||||
|
|
||||||
|
# test evaluation order of dictionary key/value pair (in 3.4 it's backwards)
|
||||||
|
{print_ret(1):print_ret(2)}
|
||||||
|
|
||||||
# from basics/syntaxerror.py
|
# from basics/syntaxerror.py
|
||||||
# can't have multiple * or ** (in 3.5 we can)
|
# can't have multiple * or ** (in 3.5 we can)
|
||||||
def test_syntax(code):
|
def test_syntax(code):
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
None
|
None
|
||||||
['a', 'b']
|
['a', 'b']
|
||||||
('a', 'b') {'kw_arg': None}
|
('a', 'b') {'kw_arg': None}
|
||||||
|
2
|
||||||
|
1
|
||||||
SyntaxError
|
SyntaxError
|
||||||
SyntaxError
|
SyntaxError
|
||||||
3.4
|
3.4
|
||||||
|
Loading…
Reference in New Issue
Block a user