Add a test for unpack assignment
This commit is contained in:
@@ -69,3 +69,4 @@ add_dependencies(rt_test dc_test)
|
||||
|
||||
add_custom_target(check "${CMAKE_CURRENT_SOURCE_DIR}/tests/all_tests.sh"
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
add_dependencies(check pycdc)
|
||||
|
BIN
tests/compiled/unpack_assign.1.0.pyc
Normal file
BIN
tests/compiled/unpack_assign.1.0.pyc
Normal file
Binary file not shown.
BIN
tests/compiled/unpack_assign.1.5.pyc
Normal file
BIN
tests/compiled/unpack_assign.1.5.pyc
Normal file
Binary file not shown.
BIN
tests/compiled/unpack_assign.2.2.pyc
Normal file
BIN
tests/compiled/unpack_assign.2.2.pyc
Normal file
Binary file not shown.
BIN
tests/compiled/unpack_assign.2.5.pyc
Normal file
BIN
tests/compiled/unpack_assign.2.5.pyc
Normal file
Binary file not shown.
BIN
tests/compiled/unpack_assign.2.7.pyc
Normal file
BIN
tests/compiled/unpack_assign.2.7.pyc
Normal file
Binary file not shown.
BIN
tests/compiled/unpack_assign.3.0.pyc
Normal file
BIN
tests/compiled/unpack_assign.3.0.pyc
Normal file
Binary file not shown.
BIN
tests/compiled/unpack_assign.3.7.pyc
Normal file
BIN
tests/compiled/unpack_assign.3.7.pyc
Normal file
Binary file not shown.
7
tests/input/unpack_assign.py
Normal file
7
tests/input/unpack_assign.py
Normal file
@@ -0,0 +1,7 @@
|
||||
x = (1, 2, 3)
|
||||
a, b, c = x
|
||||
#c, b, a = (a, b, c) # This gets optimized by newer Python compilers...
|
||||
|
||||
x = (1,)
|
||||
a, = x
|
||||
#c, = (a,) # This gets optimized by newer Python compilers...
|
4
tests/tokenized/unpack_assign.txt
Normal file
4
tests/tokenized/unpack_assign.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
x = ( 1 , 2 , 3 ) <EOL>
|
||||
( a , b , c ) = x <EOL>
|
||||
x = ( 1 , ) <EOL>
|
||||
( a , ) = x <EOL>
|
Reference in New Issue
Block a user