summaryrefslogtreecommitdiff
path: root/tests/functional/u/unpacking/unpacking_non_sequence_py310.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functional/u/unpacking/unpacking_non_sequence_py310.py')
-rw-r--r--tests/functional/u/unpacking/unpacking_non_sequence_py310.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/functional/u/unpacking/unpacking_non_sequence_py310.py b/tests/functional/u/unpacking/unpacking_non_sequence_py310.py
new file mode 100644
index 000000000..73492706a
--- /dev/null
+++ b/tests/functional/u/unpacking/unpacking_non_sequence_py310.py
@@ -0,0 +1,11 @@
+"""Test returns from structural pattern matching cases."""
+
+def unpack(num) -> tuple[int, int]:
+ """Return a tuple of integers."""
+ match num:
+ case 1:
+ return 1, 1
+ case _:
+ return 0, 0
+
+x, y = unpack(1)