diff --git a/python/ql/test/library-tests/ControlFlow/bindings/starred.py b/python/ql/test/library-tests/ControlFlow/bindings/starred.py new file mode 100644 index 00000000000..ac38c74ef12 --- /dev/null +++ b/python/ql/test/library-tests/ControlFlow/bindings/starred.py @@ -0,0 +1,4 @@ +# Starred-target edge cases — wired in the new CFG. + +# Starred target in a Tuple LHS. +*head, tail = [1, 2, 3] # $ cfgdefines=head cfgdefines=tail diff --git a/python/ql/test/library-tests/ControlFlow/bindings/walrus_starred.py b/python/ql/test/library-tests/ControlFlow/bindings/walrus.py similarity index 62% rename from python/ql/test/library-tests/ControlFlow/bindings/walrus_starred.py rename to python/ql/test/library-tests/ControlFlow/bindings/walrus.py index 5c0c1bd8319..d370fd342dc 100644 --- a/python/ql/test/library-tests/ControlFlow/bindings/walrus_starred.py +++ b/python/ql/test/library-tests/ControlFlow/bindings/walrus.py @@ -1,4 +1,4 @@ -# Walrus and starred-target edge cases — wired in the new CFG. +# Walrus edge cases — wired in the new CFG. # Walrus in expression context. if (y := 5) > 0: # $ cfgdefines=y @@ -7,8 +7,3 @@ if (y := 5) > 0: # $ cfgdefines=y # Walrus in a comprehension. The comprehension introduces a synthetic # `.0` parameter bound to the iterable. _ = [w for _ in range(3) if (w := 1)] # $ cfgdefines=_ cfgdefines=w cfgdefines=.0 - -# Starred target in a Tuple LHS. -*head, tail = [1, 2, 3] # $ cfgdefines=head cfgdefines=tail - -