Skip to content

Commit 0ec31c0

Browse files
committed
Increase test coverage
1 parent 482e349 commit 0ec31c0

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

tests/functional/m/match_class_pattern.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,9 @@ def f2(x):
3232
case A(1, x=1): ... # [multiple-class-sub-patterns]
3333
case A(1, y=1): ...
3434
case A(x=1, x=2, x=3): ... # [multiple-class-sub-patterns]
35+
36+
# with invalid __match_args__ we can't detect duplicates with positional patterns
37+
case D(1, x=1): ...
38+
39+
# If class name is undefined, we can't get __match_args__
40+
case NotDefined(1, x=1): ... # [undefined-variable]

tests/functional/m/match_class_pattern.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ too-many-positional-sub-patterns:25:13:25:20:f1:A excepts 1 positional sub-patte
44
too-many-positional-sub-patterns:27:13:27:23:f1:B excepts 2 positional sub-patterns (given 3):INFERENCE
55
multiple-class-sub-patterns:32:13:32:22:f2:Multiple sub-patterns for attribute x:INFERENCE
66
multiple-class-sub-patterns:34:13:34:29:f2:Multiple sub-patterns for attribute x:INFERENCE
7+
undefined-variable:40:13:40:23:f2:Undefined variable 'NotDefined':UNDEFINED

0 commit comments

Comments
 (0)