diff --git a/CMakeLists.txt b/CMakeLists.txt index f32d2de..099997a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/tests/compiled/unpack_assign.1.0.pyc b/tests/compiled/unpack_assign.1.0.pyc new file mode 100644 index 0000000..79410b5 Binary files /dev/null and b/tests/compiled/unpack_assign.1.0.pyc differ diff --git a/tests/compiled/unpack_assign.1.5.pyc b/tests/compiled/unpack_assign.1.5.pyc new file mode 100644 index 0000000..79f99c1 Binary files /dev/null and b/tests/compiled/unpack_assign.1.5.pyc differ diff --git a/tests/compiled/unpack_assign.2.2.pyc b/tests/compiled/unpack_assign.2.2.pyc new file mode 100644 index 0000000..5a65114 Binary files /dev/null and b/tests/compiled/unpack_assign.2.2.pyc differ diff --git a/tests/compiled/unpack_assign.2.5.pyc b/tests/compiled/unpack_assign.2.5.pyc new file mode 100644 index 0000000..4ce9ae0 Binary files /dev/null and b/tests/compiled/unpack_assign.2.5.pyc differ diff --git a/tests/compiled/unpack_assign.2.7.pyc b/tests/compiled/unpack_assign.2.7.pyc new file mode 100644 index 0000000..e21f319 Binary files /dev/null and b/tests/compiled/unpack_assign.2.7.pyc differ diff --git a/tests/compiled/unpack_assign.3.0.pyc b/tests/compiled/unpack_assign.3.0.pyc new file mode 100644 index 0000000..149b96f Binary files /dev/null and b/tests/compiled/unpack_assign.3.0.pyc differ diff --git a/tests/compiled/unpack_assign.3.7.pyc b/tests/compiled/unpack_assign.3.7.pyc new file mode 100644 index 0000000..927dea7 Binary files /dev/null and b/tests/compiled/unpack_assign.3.7.pyc differ diff --git a/tests/input/unpack_assign.py b/tests/input/unpack_assign.py new file mode 100644 index 0000000..0530289 --- /dev/null +++ b/tests/input/unpack_assign.py @@ -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... diff --git a/tests/tokenized/unpack_assign.txt b/tests/tokenized/unpack_assign.txt new file mode 100644 index 0000000..6a52f8d --- /dev/null +++ b/tests/tokenized/unpack_assign.txt @@ -0,0 +1,4 @@ +x = ( 1 , 2 , 3 ) +( a , b , c ) = x +x = ( 1 , ) +( a , ) = x