summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorda-woods <dw-git@d-woods.co.uk>2022-07-17 11:48:59 +0100
committerda-woods <dw-git@d-woods.co.uk>2022-07-17 11:48:59 +0100
commite14e3308b47ed7b4e84646241d21cb3061d422e6 (patch)
tree0f2bf57bcc23ae18feeeecf17bb5c127b2b9bb7d
parent9924b689f3f6160f48dbf7a17df0f0b9f277f583 (diff)
downloadcython-e14e3308b47ed7b4e84646241d21cb3061d422e6.tar.gz
Make disabling returns easier to find
-rw-r--r--tests/run/test_patma.py532
1 files changed, 266 insertions, 266 deletions
diff --git a/tests/run/test_patma.py b/tests/run/test_patma.py
index d815b7191..6956099e2 100644
--- a/tests/run/test_patma.py
+++ b/tests/run/test_patma.py
@@ -84,7 +84,7 @@ class TestTracing(unittest.TestCase):
for pattern in patterns:
with self.subTest(pattern):
code = inspect.cleandoc("""
- if 0: # FIXME remove once pattern matching is fully implemented!
+ if 0: # disabled - FIXME remove once pattern matching is fully implemented!
match None:
case {}:
pass
@@ -100,7 +100,7 @@ class TestInheritance(unittest.TestCase):
@staticmethod
def check_sequence_then_mapping(x):
- return
+ return # disabled
match x:
case [*_]:
return "seq"
@@ -109,7 +109,7 @@ class TestInheritance(unittest.TestCase):
@staticmethod
def check_mapping_then_sequence(x):
- return
+ return # disabled
match x:
case {}:
return "map"
@@ -117,7 +117,7 @@ class TestInheritance(unittest.TestCase):
return "seq"
def test_multiple_inheritance_mapping(self):
- return
+ return # disabled
class C:
pass
class M1(collections.UserDict, collections.abc.Sequence):
@@ -138,7 +138,7 @@ class TestInheritance(unittest.TestCase):
self.assertEqual(self.check_mapping_then_sequence(M4()), "map")
def test_multiple_inheritance_sequence(self):
- return
+ return # disabled
class C:
pass
class S1(collections.UserList, collections.abc.Mapping):
@@ -159,7 +159,7 @@ class TestInheritance(unittest.TestCase):
self.assertEqual(self.check_mapping_then_sequence(S4()), "seq")
def test_late_registration_mapping(self):
- return
+ return # disabled
class Parent:
pass
class ChildPre(Parent):
@@ -183,7 +183,7 @@ class TestInheritance(unittest.TestCase):
self.assertEqual(self.check_mapping_then_sequence(GrandchildPost()), "map")
def test_late_registration_sequence(self):
- return
+ return # disabled
class Parent:
pass
class ChildPre(Parent):
@@ -210,14 +210,14 @@ class TestInheritance(unittest.TestCase):
class TestPatma(unittest.TestCase):
def test_patma_000(self):
- return
+ return # disabled
match 0:
case 0:
x = True
self.assertIs(x, True)
def test_patma_001(self):
- return
+ return # disabled
match 0:
case 0 if False:
x = False
@@ -226,7 +226,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(x, True)
def test_patma_002(self):
- return
+ return # disabled
match 0:
case 0:
x = True
@@ -235,7 +235,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(x, True)
def test_patma_003(self):
- return
+ return # disabled
x = False
match 0:
case 0 | 1 | 2 | 3:
@@ -243,7 +243,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(x, True)
def test_patma_004(self):
- return
+ return # disabled
x = False
match 1:
case 0 | 1 | 2 | 3:
@@ -251,7 +251,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(x, True)
def test_patma_005(self):
- return
+ return # disabled
x = False
match 2:
case 0 | 1 | 2 | 3:
@@ -259,7 +259,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(x, True)
def test_patma_006(self):
- return
+ return # disabled
x = False
match 3:
case 0 | 1 | 2 | 3:
@@ -267,7 +267,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(x, True)
def test_patma_007(self):
- return
+ return # disabled
x = False
match 4:
case 0 | 1 | 2 | 3:
@@ -275,7 +275,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(x, False)
def test_patma_008(self):
- return
+ return # disabled
x = 0
class A:
y = 1
@@ -286,7 +286,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(A.y, 1)
def test_patma_009(self):
- return
+ return # disabled
class A:
B = 0
match 0:
@@ -302,14 +302,14 @@ class TestPatma(unittest.TestCase):
self.assertEqual(z, 2)
def test_patma_010(self):
- return
+ return # disabled
match ():
case []:
x = 0
self.assertEqual(x, 0)
def test_patma_011(self):
- return
+ return # disabled
match (0, 1, 2):
case [*x]:
y = 0
@@ -317,7 +317,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_012(self):
- return
+ return # disabled
match (0, 1, 2):
case [0, *x]:
y = 0
@@ -325,7 +325,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_013(self):
- return
+ return # disabled
match (0, 1, 2):
case [0, 1, *x,]:
y = 0
@@ -333,7 +333,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_014(self):
- return
+ return # disabled
match (0, 1, 2):
case [0, 1, 2, *x]:
y = 0
@@ -341,7 +341,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_015(self):
- return
+ return # disabled
match (0, 1, 2):
case [*x, 2,]:
y = 0
@@ -349,7 +349,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_016(self):
- return
+ return # disabled
match (0, 1, 2):
case [*x, 1, 2]:
y = 0
@@ -357,7 +357,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_017(self):
- return
+ return # disabled
match (0, 1, 2):
case [*x, 0, 1, 2,]:
y = 0
@@ -365,7 +365,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_018(self):
- return
+ return # disabled
match (0, 1, 2):
case [0, *x, 2]:
y = 0
@@ -373,7 +373,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_019(self):
- return
+ return # disabled
match (0, 1, 2):
case [0, 1, *x, 2,]:
y = 0
@@ -381,7 +381,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_020(self):
- return
+ return # disabled
match (0, 1, 2):
case [0, *x, 1, 2]:
y = 0
@@ -389,7 +389,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_021(self):
- return
+ return # disabled
match (0, 1, 2):
case [*x,]:
y = 0
@@ -397,7 +397,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_022(self):
- return
+ return # disabled
x = {}
match x:
case {}:
@@ -406,7 +406,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_023(self):
- return
+ return # disabled
x = {0: 0}
match x:
case {}:
@@ -415,7 +415,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_024(self):
- return
+ return # disabled
x = {}
y = None
match x:
@@ -425,7 +425,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(y, None)
def test_patma_025(self):
- return
+ return # disabled
x = {0: 0}
match x:
case {0: (0 | 1 | 2 as z)}:
@@ -435,7 +435,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(z, 0)
def test_patma_026(self):
- return
+ return # disabled
x = {0: 1}
match x:
case {0: (0 | 1 | 2 as z)}:
@@ -445,7 +445,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(z, 1)
def test_patma_027(self):
- return
+ return # disabled
x = {0: 2}
match x:
case {0: (0 | 1 | 2 as z)}:
@@ -455,7 +455,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(z, 2)
def test_patma_028(self):
- return
+ return # disabled
x = {0: 3}
y = None
match x:
@@ -465,7 +465,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(y, None)
def test_patma_029(self):
- return
+ return # disabled
x = {}
y = None
match x:
@@ -479,7 +479,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(y, None)
def test_patma_030(self):
- return
+ return # disabled
x = {False: (True, 2.0, {})}
match x:
case {0: [1, 2, {}]}:
@@ -492,7 +492,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_031(self):
- return
+ return # disabled
x = {False: (True, 2.0, {}), 1: [[]], 2: 0}
match x:
case {0: [1, 2, {}]}:
@@ -505,7 +505,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_032(self):
- return
+ return # disabled
x = {False: (True, 2.0, {}), 1: [[]], 2: 0}
match x:
case {0: [1, 2]}:
@@ -518,7 +518,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 1)
def test_patma_033(self):
- return
+ return # disabled
x = []
match x:
case {0: [1, 2, {}]}:
@@ -531,7 +531,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 2)
def test_patma_034(self):
- return
+ return # disabled
x = {0: 0}
match x:
case {0: [1, 2, {}]}:
@@ -544,7 +544,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 1)
def test_patma_035(self):
- return
+ return # disabled
x = {0: 0}
match x:
case {0: [1, 2, {}]}:
@@ -557,7 +557,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 1)
def test_patma_036(self):
- return
+ return # disabled
x = 0
match x:
case 0 | 1 | 2:
@@ -566,7 +566,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_037(self):
- return
+ return # disabled
x = 1
match x:
case 0 | 1 | 2:
@@ -575,7 +575,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_038(self):
- return
+ return # disabled
x = 2
match x:
case 0 | 1 | 2:
@@ -584,7 +584,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_039(self):
- return
+ return # disabled
x = 3
y = None
match x:
@@ -594,7 +594,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(y, None)
def test_patma_040(self):
- return
+ return # disabled
x = 0
match x:
case (0 as z) | (1 as z) | (2 as z) if z == x % 2:
@@ -604,7 +604,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(z, 0)
def test_patma_041(self):
- return
+ return # disabled
x = 1
match x:
case (0 as z) | (1 as z) | (2 as z) if z == x % 2:
@@ -614,7 +614,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(z, 1)
def test_patma_042(self):
- return
+ return # disabled
x = 2
y = None
match x:
@@ -625,7 +625,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(z, 2)
def test_patma_043(self):
- return
+ return # disabled
x = 3
y = None
match x:
@@ -635,7 +635,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(y, None)
def test_patma_044(self):
- return
+ return # disabled
x = ()
match x:
case []:
@@ -644,7 +644,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_045(self):
- return
+ return # disabled
x = ()
match x:
case ():
@@ -653,7 +653,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_046(self):
- return
+ return # disabled
x = (0,)
match x:
case [0]:
@@ -662,7 +662,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_047(self):
- return
+ return # disabled
x = ((),)
match x:
case [[]]:
@@ -671,7 +671,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_048(self):
- return
+ return # disabled
x = [0, 1]
match x:
case [0, 1] | [1, 0]:
@@ -680,7 +680,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_049(self):
- return
+ return # disabled
x = [1, 0]
match x:
case [0, 1] | [1, 0]:
@@ -689,7 +689,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_050(self):
- return
+ return # disabled
x = [0, 0]
y = None
match x:
@@ -699,7 +699,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(y, None)
def test_patma_051(self):
- return
+ return # disabled
w = None
x = [1, 0]
match x:
@@ -713,7 +713,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(z, 0)
def test_patma_052(self):
- return
+ return # disabled
x = [1, 0]
match x:
case [0]:
@@ -726,7 +726,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 2)
def test_patma_053(self):
- return
+ return # disabled
x = {0}
y = None
match x:
@@ -736,7 +736,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(y, None)
def test_patma_054(self):
- return
+ return # disabled
x = set()
y = None
match x:
@@ -746,7 +746,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(y, None)
def test_patma_055(self):
- return
+ return # disabled
x = iter([1, 2, 3])
y = None
match x:
@@ -756,7 +756,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(y, None)
def test_patma_056(self):
- return
+ return # disabled
x = {}
y = None
match x:
@@ -766,7 +766,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(y, None)
def test_patma_057(self):
- return
+ return # disabled
x = {0: False, 1: True}
y = None
match x:
@@ -776,7 +776,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(y, None)
def test_patma_058(self):
- return
+ return # disabled
x = 0
match x:
case 0:
@@ -785,7 +785,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_059(self):
- return
+ return # disabled
x = 0
y = None
match x:
@@ -795,7 +795,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, None)
def test_patma_060(self):
- return
+ return # disabled
x = 0
y = None
match x:
@@ -805,7 +805,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(y, None)
def test_patma_061(self):
- return
+ return # disabled
x = 0
y = None
match x:
@@ -815,7 +815,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(y, None)
def test_patma_062(self):
- return
+ return # disabled
x = 0
match x:
case 0:
@@ -826,7 +826,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_063(self):
- return
+ return # disabled
x = 0
y = None
match x:
@@ -838,7 +838,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(y, None)
def test_patma_064(self):
- return
+ return # disabled
x = "x"
match x:
case "x":
@@ -849,7 +849,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_065(self):
- return
+ return # disabled
x = "x"
match x:
case "y":
@@ -860,7 +860,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 1)
def test_patma_066(self):
- return
+ return # disabled
x = "x"
match x:
case "":
@@ -871,7 +871,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 1)
def test_patma_067(self):
- return
+ return # disabled
x = b"x"
match x:
case b"y":
@@ -882,7 +882,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 1)
def test_patma_068(self):
- return
+ return # disabled
x = 0
match x:
case 0 if False:
@@ -893,7 +893,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 1)
def test_patma_069(self):
- return
+ return # disabled
x = 0
y = None
match x:
@@ -905,7 +905,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(y, None)
def test_patma_070(self):
- return
+ return # disabled
x = 0
match x:
case 0 if True:
@@ -916,7 +916,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_071(self):
- return
+ return # disabled
x = 0
match x:
case 0 if 1:
@@ -927,7 +927,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_072(self):
- return
+ return # disabled
x = 0
match x:
case 0 if True:
@@ -939,7 +939,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 2)
def test_patma_073(self):
- return
+ return # disabled
x = 0
match x:
case 0 if 0:
@@ -951,7 +951,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 2)
def test_patma_074(self):
- return
+ return # disabled
x = 0
y = None
match x:
@@ -963,7 +963,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(y, None)
def test_patma_075(self):
- return
+ return # disabled
x = "x"
match x:
case ["x"]:
@@ -974,7 +974,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 1)
def test_patma_076(self):
- return
+ return # disabled
x = b"x"
match x:
case [b"x"]:
@@ -989,7 +989,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 4)
def test_patma_077(self):
- return
+ return # disabled
x = bytearray(b"x")
y = None
match x:
@@ -1001,7 +1001,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(y, None)
def test_patma_078(self):
- return
+ return # disabled
x = ""
match x:
case []:
@@ -1014,7 +1014,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 2)
def test_patma_079(self):
- return
+ return # disabled
x = "xxx"
match x:
case ["x", "x", "x"]:
@@ -1027,7 +1027,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 2)
def test_patma_080(self):
- return
+ return # disabled
x = b"xxx"
match x:
case [120, 120, 120]:
@@ -1040,7 +1040,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 2)
def test_patma_081(self):
- return
+ return # disabled
x = 0
match x:
case 0 if not (x := 1):
@@ -1052,7 +1052,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(z, 0)
def test_patma_082(self):
- return
+ return # disabled
x = 0
match x:
case (1 as z) if not (x := 1):
@@ -1063,7 +1063,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 1)
def test_patma_083(self):
- return
+ return # disabled
x = 0
match x:
case (0 as z):
@@ -1073,7 +1073,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(z, 0)
def test_patma_084(self):
- return
+ return # disabled
x = 0
y = None
match x:
@@ -1083,7 +1083,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(y, None)
def test_patma_085(self):
- return
+ return # disabled
x = 0
y = None
match x:
@@ -1095,7 +1095,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(z, 0)
def test_patma_086(self):
- return
+ return # disabled
x = 0
match x:
case ((0 as w) as z):
@@ -1106,7 +1106,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(z, 0)
def test_patma_087(self):
- return
+ return # disabled
x = 0
match x:
case (0 | 1) | 2:
@@ -1115,7 +1115,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_088(self):
- return
+ return # disabled
x = 1
match x:
case (0 | 1) | 2:
@@ -1124,7 +1124,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_089(self):
- return
+ return # disabled
x = 2
match x:
case (0 | 1) | 2:
@@ -1133,7 +1133,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_090(self):
- return
+ return # disabled
x = 3
y = None
match x:
@@ -1143,7 +1143,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(y, None)
def test_patma_091(self):
- return
+ return # disabled
x = 0
match x:
case 0 | (1 | 2):
@@ -1152,7 +1152,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_092(self):
- return
+ return # disabled
x = 1
match x:
case 0 | (1 | 2):
@@ -1161,7 +1161,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_093(self):
- return
+ return # disabled
x = 2
match x:
case 0 | (1 | 2):
@@ -1170,7 +1170,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_094(self):
- return
+ return # disabled
x = 3
y = None
match x:
@@ -1180,7 +1180,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(y, None)
def test_patma_095(self):
- return
+ return # disabled
x = 0
match x:
case -0:
@@ -1189,7 +1189,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_096(self):
- return
+ return # disabled
x = 0
match x:
case -0.0:
@@ -1198,7 +1198,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_097(self):
- return
+ return # disabled
x = 0
match x:
case -0j:
@@ -1207,7 +1207,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_098(self):
- return
+ return # disabled
x = 0
match x:
case -0.0j:
@@ -1216,7 +1216,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_099(self):
- return
+ return # disabled
x = -1
match x:
case -1:
@@ -1225,7 +1225,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_100(self):
- return
+ return # disabled
x = -1.5
match x:
case -1.5:
@@ -1234,7 +1234,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_101(self):
- return
+ return # disabled
x = -1j
match x:
case -1j:
@@ -1243,7 +1243,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_102(self):
- return
+ return # disabled
x = -1.5j
match x:
case -1.5j:
@@ -1252,7 +1252,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_103(self):
- return
+ return # disabled
x = 0
match x:
case 0 + 0j:
@@ -1261,7 +1261,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_104(self):
- return
+ return # disabled
x = 0
match x:
case 0 - 0j:
@@ -1270,7 +1270,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_105(self):
- return
+ return # disabled
x = 0
match x:
case -0 + 0j:
@@ -1279,7 +1279,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_106(self):
- return
+ return # disabled
x = 0
match x:
case -0 - 0j:
@@ -1288,7 +1288,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_107(self):
- return
+ return # disabled
x = 0.25 + 1.75j
match x:
case 0.25 + 1.75j:
@@ -1297,7 +1297,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_108(self):
- return
+ return # disabled
x = 0.25 - 1.75j
match x:
case 0.25 - 1.75j:
@@ -1306,7 +1306,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_109(self):
- return
+ return # disabled
x = -0.25 + 1.75j
match x:
case -0.25 + 1.75j:
@@ -1315,7 +1315,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_110(self):
- return
+ return # disabled
x = -0.25 - 1.75j
match x:
case -0.25 - 1.75j:
@@ -1324,7 +1324,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_111(self):
- return
+ return # disabled
class A:
B = 0
x = 0
@@ -1336,7 +1336,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_112(self):
- return
+ return # disabled
class A:
class B:
C = 0
@@ -1349,7 +1349,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_113(self):
- return
+ return # disabled
class A:
class B:
C = 0
@@ -1366,7 +1366,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 1)
def test_patma_114(self):
- return
+ return # disabled
class A:
class B:
class C:
@@ -1380,7 +1380,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_115(self):
- return
+ return # disabled
class A:
class B:
class C:
@@ -1398,7 +1398,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 1)
def test_patma_116(self):
- return
+ return # disabled
match = case = 0
match match:
case case:
@@ -1408,7 +1408,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(x, 0)
def test_patma_117(self):
- return
+ return # disabled
match = case = 0
match case:
case match:
@@ -1418,7 +1418,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(x, 0)
def test_patma_118(self):
- return
+ return # disabled
x = []
match x:
case [*_, _]:
@@ -1429,7 +1429,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 1)
def test_patma_119(self):
- return
+ return # disabled
x = collections.defaultdict(int)
match x:
case {0: 0}:
@@ -1440,7 +1440,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 1)
def test_patma_120(self):
- return
+ return # disabled
x = collections.defaultdict(int)
match x:
case {0: 0}:
@@ -1452,14 +1452,14 @@ class TestPatma(unittest.TestCase):
self.assertEqual(z, {})
def test_patma_121(self):
- return
+ return # disabled
match ():
case ():
x = 0
self.assertEqual(x, 0)
def test_patma_122(self):
- return
+ return # disabled
match (0, 1, 2):
case (*x,):
y = 0
@@ -1467,7 +1467,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_123(self):
- return
+ return # disabled
match (0, 1, 2):
case 0, *x:
y = 0
@@ -1475,7 +1475,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_124(self):
- return
+ return # disabled
match (0, 1, 2):
case (0, 1, *x,):
y = 0
@@ -1483,7 +1483,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_125(self):
- return
+ return # disabled
match (0, 1, 2):
case 0, 1, 2, *x:
y = 0
@@ -1491,7 +1491,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_126(self):
- return
+ return # disabled
match (0, 1, 2):
case *x, 2,:
y = 0
@@ -1499,7 +1499,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_127(self):
- return
+ return # disabled
match (0, 1, 2):
case (*x, 1, 2):
y = 0
@@ -1507,7 +1507,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_128(self):
- return
+ return # disabled
match (0, 1, 2):
case *x, 0, 1, 2,:
y = 0
@@ -1515,7 +1515,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_129(self):
- return
+ return # disabled
match (0, 1, 2):
case (0, *x, 2):
y = 0
@@ -1523,7 +1523,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_130(self):
- return
+ return # disabled
match (0, 1, 2):
case 0, 1, *x, 2,:
y = 0
@@ -1531,7 +1531,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_131(self):
- return
+ return # disabled
match (0, 1, 2):
case (0, *x, 1, 2):
y = 0
@@ -1539,7 +1539,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_132(self):
- return
+ return # disabled
match (0, 1, 2):
case *x,:
y = 0
@@ -1547,7 +1547,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_133(self):
- return
+ return # disabled
x = collections.defaultdict(int, {0: 1})
match x:
case {1: 0}:
@@ -1560,7 +1560,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 2)
def test_patma_134(self):
- return
+ return # disabled
x = collections.defaultdict(int, {0: 1})
match x:
case {1: 0}:
@@ -1574,7 +1574,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(z, {0: 1})
def test_patma_135(self):
- return
+ return # disabled
x = collections.defaultdict(int, {0: 1})
match x:
case {1: 0}:
@@ -1588,7 +1588,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(z, {})
def test_patma_136(self):
- return
+ return # disabled
x = {0: 1}
match x:
case {1: 0}:
@@ -1601,7 +1601,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 1)
def test_patma_137(self):
- return
+ return # disabled
x = {0: 1}
match x:
case {1: 0}:
@@ -1615,7 +1615,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(z, {0: 1})
def test_patma_138(self):
- return
+ return # disabled
x = {0: 1}
match x:
case {1: 0}:
@@ -1629,7 +1629,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(z, {})
def test_patma_139(self):
- return
+ return # disabled
x = False
match x:
case bool(z):
@@ -1639,7 +1639,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(z, x)
def test_patma_140(self):
- return
+ return # disabled
x = True
match x:
case bool(z):
@@ -1649,7 +1649,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(z, x)
def test_patma_141(self):
- return
+ return # disabled
x = bytearray()
match x:
case bytearray(z):
@@ -1659,7 +1659,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(z, x)
def test_patma_142(self):
- return
+ return # disabled
x = b""
match x:
case bytes(z):
@@ -1669,7 +1669,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(z, x)
def test_patma_143(self):
- return
+ return # disabled
x = {}
match x:
case dict(z):
@@ -1679,7 +1679,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(z, x)
def test_patma_144(self):
- return
+ return # disabled
x = 0.0
match x:
case float(z):
@@ -1689,7 +1689,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(z, x)
def test_patma_145(self):
- return
+ return # disabled
x = frozenset()
match x:
case frozenset(z):
@@ -1699,7 +1699,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(z, x)
def test_patma_146(self):
- return
+ return # disabled
x = 0
match x:
case int(z):
@@ -1709,7 +1709,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(z, x)
def test_patma_147(self):
- return
+ return # disabled
x = []
match x:
case list(z):
@@ -1719,7 +1719,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(z, x)
def test_patma_148(self):
- return
+ return # disabled
x = set()
match x:
case set(z):
@@ -1729,7 +1729,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(z, x)
def test_patma_149(self):
- return
+ return # disabled
x = ""
match x:
case str(z):
@@ -1739,7 +1739,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(z, x)
def test_patma_150(self):
- return
+ return # disabled
x = ()
match x:
case tuple(z):
@@ -1749,7 +1749,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(z, x)
def test_patma_151(self):
- return
+ return # disabled
x = 0
match x,:
case y,:
@@ -1759,7 +1759,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(z, 0)
def test_patma_152(self):
- return
+ return # disabled
w = 0
x = 0
match w, x:
@@ -1772,7 +1772,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(v, 0)
def test_patma_153(self):
- return
+ return # disabled
x = 0
match w := x,:
case y as v,:
@@ -1784,7 +1784,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(v, y)
def test_patma_154(self):
- return
+ return # disabled
x = 0
y = None
match x:
@@ -1794,7 +1794,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(y, None)
def test_patma_155(self):
- return
+ return # disabled
x = 0
y = None
match x:
@@ -1804,7 +1804,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(y, None)
def test_patma_156(self):
- return
+ return # disabled
x = 0
match x:
case z:
@@ -1814,7 +1814,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(z, x)
def test_patma_157(self):
- return
+ return # disabled
x = 0
y = None
match x:
@@ -1824,7 +1824,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(y, None)
def test_patma_158(self):
- return
+ return # disabled
x = 0
match x:
case -1e1000:
@@ -1835,7 +1835,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 1)
def test_patma_159(self):
- return
+ return # disabled
x = 0
match x:
case 0 if not x:
@@ -1846,7 +1846,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_160(self):
- return
+ return # disabled
x = 0
z = None
match x:
@@ -1859,7 +1859,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(z, None)
def test_patma_161(self):
- return
+ return # disabled
x = 0
match x:
case 0:
@@ -1870,7 +1870,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_162(self):
- return
+ return # disabled
x = 0
match x:
case 1 if x:
@@ -1881,7 +1881,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 1)
def test_patma_163(self):
- return
+ return # disabled
x = 0
y = None
match x:
@@ -1893,7 +1893,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(y, None)
def test_patma_164(self):
- return
+ return # disabled
x = 0
match x:
case 1:
@@ -1905,7 +1905,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(z, x)
def test_patma_165(self):
- return
+ return # disabled
x = 0
match x:
case 1 if x:
@@ -1916,7 +1916,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 1)
def test_patma_166(self):
- return
+ return # disabled
x = 0
match x:
case z if not z:
@@ -1928,7 +1928,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(z, x)
def test_patma_167(self):
- return
+ return # disabled
x = 0
match x:
case z if not z:
@@ -1940,7 +1940,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(z, x)
def test_patma_168(self):
- return
+ return # disabled
x = 0
match x:
case z if not x:
@@ -1952,7 +1952,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(z, x)
def test_patma_169(self):
- return
+ return # disabled
x = 0
match x:
case z if not z:
@@ -1964,7 +1964,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(z, x)
def test_patma_170(self):
- return
+ return # disabled
x = 0
match x:
case _ if not x:
@@ -1975,7 +1975,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_171(self):
- return
+ return # disabled
x = 0
y = None
match x:
@@ -1987,7 +1987,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(y, None)
def test_patma_172(self):
- return
+ return # disabled
x = 0
z = None
match x:
@@ -2000,7 +2000,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(z, None)
def test_patma_173(self):
- return
+ return # disabled
x = 0
match x:
case _ if not x:
@@ -2011,7 +2011,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_174(self):
- return
+ return # disabled
def http_error(status):
match status:
case 400:
@@ -2036,7 +2036,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(http_error(401 | 403 | 404), "Something else") # 407
def test_patma_175(self):
- return
+ return # disabled
def http_error(status):
match status:
case 400:
@@ -2055,7 +2055,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(http_error(401 | 403 | 404), None) # 407
def test_patma_176(self):
- return
+ return # disabled
def whereis(point):
match point:
case (0, 0):
@@ -2075,7 +2075,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(whereis(42), "Not a point")
def test_patma_177(self):
- return
+ return # disabled
def whereis(point):
match point:
case Point(0, 0):
@@ -2099,7 +2099,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(whereis(42), "Not a point")
def test_patma_178(self):
- return
+ return # disabled
def whereis(point):
match point:
case Point(1, var):
@@ -2108,7 +2108,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(whereis(Point(0, 0)), None)
def test_patma_179(self):
- return
+ return # disabled
def whereis(point):
match point:
case Point(1, y=var):
@@ -2117,7 +2117,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(whereis(Point(0, 0)), None)
def test_patma_180(self):
- return
+ return # disabled
def whereis(point):
match point:
case Point(x=1, y=var):
@@ -2126,7 +2126,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(whereis(Point(0, 0)), None)
def test_patma_181(self):
- return
+ return # disabled
def whereis(point):
match point:
case Point(y=var, x=1):
@@ -2135,7 +2135,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(whereis(Point(0, 0)), None)
def test_patma_182(self):
- return
+ return # disabled
def whereis(points):
match points:
case []:
@@ -2158,7 +2158,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(whereis([Point(0, 1), Point(0, 1), Point(0, 1)]), "Something else")
def test_patma_183(self):
- return
+ return # disabled
def whereis(point):
match point:
case Point(x, y) if x == y:
@@ -2173,7 +2173,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(whereis(Point("X", "x")), "Not on the diagonal")
def test_patma_184(self):
- return
+ return # disabled
class Seq(collections.abc.Sequence):
__getitem__ = None
def __len__(self):
@@ -2184,7 +2184,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_185(self):
- return
+ return # disabled
class Seq(collections.abc.Sequence):
__getitem__ = None
def __len__(self):
@@ -2195,7 +2195,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_186(self):
- return
+ return # disabled
class Seq(collections.abc.Sequence):
def __getitem__(self, i):
return i
@@ -2209,7 +2209,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(z, 0)
def test_patma_187(self):
- return
+ return # disabled
w = range(10)
match w:
case [x, y, *rest]:
@@ -2221,7 +2221,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(rest, list(range(2, 10)))
def test_patma_188(self):
- return
+ return # disabled
w = range(100)
match w:
case (x, y, *rest):
@@ -2233,7 +2233,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(rest, list(range(2, 100)))
def test_patma_189(self):
- return
+ return # disabled
w = range(1000)
match w:
case x, y, *rest:
@@ -2245,7 +2245,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(rest, list(range(2, 1000)))
def test_patma_190(self):
- return
+ return # disabled
w = range(1 << 10)
match w:
case [x, y, *_]:
@@ -2256,7 +2256,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(z, 0)
def test_patma_191(self):
- return
+ return # disabled
w = range(1 << 20)
match w:
case (x, y, *_):
@@ -2267,7 +2267,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(z, 0)
def test_patma_192(self):
- return
+ return # disabled
w = range(1 << 30)
match w:
case x, y, *_:
@@ -2278,7 +2278,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(z, 0)
def test_patma_193(self):
- return
+ return # disabled
x = {"bandwidth": 0, "latency": 1}
match x:
case {"bandwidth": b, "latency": l}:
@@ -2289,7 +2289,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_194(self):
- return
+ return # disabled
x = {"bandwidth": 0, "latency": 1, "key": "value"}
match x:
case {"latency": l, "bandwidth": b}:
@@ -2300,7 +2300,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_195(self):
- return
+ return # disabled
x = {"bandwidth": 0, "latency": 1, "key": "value"}
match x:
case {"bandwidth": b, "latency": l, **rest}:
@@ -2312,7 +2312,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_196(self):
- return
+ return # disabled
x = {"bandwidth": 0, "latency": 1}
match x:
case {"latency": l, "bandwidth": b, **rest}:
@@ -2324,7 +2324,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_197(self):
- return
+ return # disabled
w = [Point(-1, 0), Point(1, 2)]
match w:
case (Point(x1, y1), Point(x2, y2) as p2):
@@ -2338,7 +2338,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(z, 0)
def test_patma_198(self):
- return
+ return # disabled
class Color(enum.Enum):
RED = 0
GREEN = 1
@@ -2365,7 +2365,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(f(3.0), None)
def test_patma_199(self):
- return
+ return # disabled
class Color(int, enum.Enum):
RED = 0
GREEN = 1
@@ -2392,7 +2392,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(f(3.0), None)
def test_patma_200(self):
- return
+ return # disabled
class Class:
__match_args__ = ("a", "b")
c = Class()
@@ -2406,7 +2406,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(z, 0)
def test_patma_201(self):
- return
+ return # disabled
class Class:
__match_args__ = ("a", "b")
c = Class()
@@ -2420,7 +2420,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(z, 0)
def test_patma_202(self):
- return
+ return # disabled
class Parent:
__match_args__ = "a", "b"
class Child(Parent):
@@ -2436,7 +2436,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(z, 0)
def test_patma_203(self):
- return
+ return # disabled
class Parent:
__match_args__ = ("a", "b")
class Child(Parent):
@@ -2452,7 +2452,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(z, 0)
def test_patma_204(self):
- return
+ return # disabled
def f(w):
match w:
case 42:
@@ -2465,7 +2465,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(f("42"), None)
def test_patma_205(self):
- return
+ return # disabled
def f(w):
match w:
case 42.0:
@@ -2478,7 +2478,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(f(0), None)
def test_patma_206(self):
- return
+ return # disabled
def f(w):
match w:
case 1 | 2 | 3:
@@ -2494,7 +2494,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(f("1"), None)
def test_patma_207(self):
- return
+ return # disabled
def f(w):
match w:
case [1, 2] | [3, 4]:
@@ -2509,7 +2509,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(f([1, 2.0]), {})
def test_patma_208(self):
- return
+ return # disabled
def f(w):
match w:
case x:
@@ -2521,7 +2521,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(f(None), {"x": None})
def test_patma_209(self):
- return
+ return # disabled
def f(w):
match w:
case _:
@@ -2533,7 +2533,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(f((1, 2)), {})
def test_patma_210(self):
- return
+ return # disabled
def f(w):
match w:
case (x, y, z):
@@ -2551,7 +2551,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(f(bytearray(b"abc")), None)
def test_patma_211(self):
- return
+ return # disabled
def f(w):
match w:
case {"x": x, "y": "y", "z": z}:
@@ -2564,7 +2564,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(f(({"x": "x", "y": "y"})), None)
def test_patma_212(self):
- return
+ return # disabled
def f(w):
match w:
case Point(int(xx), y="hello"):
@@ -2574,7 +2574,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(f(Point(42, "hello")), {"xx": 42})
def test_patma_213(self):
- return
+ return # disabled
def f(w):
match w:
case (p, q) as x:
@@ -2587,7 +2587,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(f((1, 2, 3)), None)
def test_patma_214(self):
- return
+ return # disabled
def f():
match 42:
case 42:
@@ -2595,7 +2595,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(set(f()), set())
def test_patma_215(self):
- return
+ return # disabled
def f():
match 1:
case 1 | 2 | 3:
@@ -2603,7 +2603,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(set(f()), set())
def test_patma_216(self):
- return
+ return # disabled
def f():
match ...:
case _:
@@ -2611,7 +2611,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(set(f()), set())
def test_patma_217(self):
- return
+ return # disabled
def f():
match ...:
case abc:
@@ -2619,7 +2619,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(set(f()), {"abc"})
def test_patma_218(self):
- return
+ return # disabled
def f():
match ..., ...:
case a, b:
@@ -2627,7 +2627,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(set(f()), {"a", "b"})
def test_patma_219(self):
- return
+ return # disabled
def f():
match {"k": ..., "l": ...}:
case {"k": a, "l": b}:
@@ -2635,7 +2635,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(set(f()), {"a", "b"})
def test_patma_220(self):
- return
+ return # disabled
def f():
match Point(..., ...):
case Point(x, y=y):
@@ -2643,7 +2643,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(set(f()), {"x", "y"})
def test_patma_221(self):
- return
+ return # disabled
def f():
match ...:
case b as a:
@@ -2651,7 +2651,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(set(f()), {"a", "b"})
def test_patma_222(self):
- return
+ return # disabled
def f(x):
match x:
case _:
@@ -2662,7 +2662,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(f(3), 0)
def test_patma_223(self):
- return
+ return # disabled
def f(x):
match x:
case 0:
@@ -2673,7 +2673,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(f(3), None)
def test_patma_224(self):
- return
+ return # disabled
def f(x):
match x:
case 0:
@@ -2686,7 +2686,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(f(3), 1)
def test_patma_225(self):
- return
+ return # disabled
def f(x):
match x:
case 0:
@@ -2699,7 +2699,7 @@ class TestPatma(unittest.TestCase):
self.assertIs(f(3), None)
def test_patma_226(self):
- return
+ return # disabled
def f(x):
match x:
case 0:
@@ -2714,7 +2714,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(f(3), 2)
def test_patma_227(self):
- return
+ return # disabled
def f(x):
match x:
case 0:
@@ -2729,14 +2729,14 @@ class TestPatma(unittest.TestCase):
self.assertIs(f(3), None)
def test_patma_228(self):
- return
+ return # disabled
match():
case():
x = 0
self.assertEqual(x, 0)
def test_patma_229(self):
- return
+ return # disabled
x = 0
match(x):
case(x):
@@ -2745,7 +2745,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_230(self):
- return
+ return # disabled
x = 0
match x:
case False:
@@ -2756,7 +2756,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 1)
def test_patma_231(self):
- return
+ return # disabled
x = 1
match x:
case True:
@@ -2767,7 +2767,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 1)
def test_patma_232(self):
- return
+ return # disabled
class Eq:
def __eq__(self, other):
return True
@@ -2780,7 +2780,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, None)
def test_patma_233(self):
- return
+ return # disabled
x = False
match x:
case False:
@@ -2789,7 +2789,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_234(self):
- return
+ return # disabled
x = True
match x:
case True:
@@ -2798,7 +2798,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_235(self):
- return
+ return # disabled
x = None
match x:
case None:
@@ -2807,7 +2807,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_236(self):
- return
+ return # disabled
x = 0
match x:
case (0 as w) as z:
@@ -2818,7 +2818,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(z, 0)
def test_patma_237(self):
- return
+ return # disabled
x = 0
match x:
case (0 as w) as z:
@@ -2829,7 +2829,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(z, 0)
def test_patma_238(self):
- return
+ return # disabled
x = ((0, 1), (2, 3))
match x:
case ((a as b, c as d) as e) as w, ((f as g, h) as i) as z:
@@ -2849,7 +2849,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(z, (2, 3))
def test_patma_239(self):
- return
+ return # disabled
x = collections.UserDict({0: 1, 2: 3})
match x:
case {2: 3}:
@@ -2858,7 +2858,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 0)
def test_patma_240(self):
- return
+ return # disabled
x = collections.UserDict({0: 1, 2: 3})
match x:
case {2: 3, **z}:
@@ -2868,7 +2868,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(z, {0: 1})
def test_patma_241(self):
- return
+ return # disabled
x = [[{0: 0}]]
match x:
case list([({-0-0j: int(real=0+0j, imag=0-0j) | (1) as z},)]):
@@ -2878,7 +2878,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(z, 0)
def test_patma_242(self):
- return
+ return # disabled
x = range(3)
match x:
case [y, *_, z]:
@@ -2889,7 +2889,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(z, 2)
def test_patma_243(self):
- return
+ return # disabled
x = range(3)
match x:
case [_, *_, y]:
@@ -2899,7 +2899,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(z, 0)
def test_patma_244(self):
- return
+ return # disabled
x = range(3)
match x:
case [*_, y]:
@@ -2909,7 +2909,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(z, 0)
def test_patma_245(self):
- return
+ return # disabled
x = {"y": 1}
match x:
case {"y": (0 as y) | (1 as y)}:
@@ -2919,7 +2919,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(z, 0)
def test_patma_246(self):
- return
+ return # disabled
def f(x):
match x:
case ((a, b, c, d, e, f, g, h, i, 9) |
@@ -2944,7 +2944,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(f(range(10, 20)), alts[4])
def test_patma_247(self):
- return
+ return # disabled
def f(x):
match x:
case [y, (a, b, c, d, e, f, g, h, i, 9) |
@@ -2969,7 +2969,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(f((False, range(10, 20), True)), alts[4])
def test_patma_248(self):
- return
+ return # disabled
class C(dict):
@staticmethod
def get(key, default=None):
@@ -2983,7 +2983,7 @@ class TestPatma(unittest.TestCase):
self.assertEqual(y, 'bar')
def test_patma_249(self):
- return
+ return # disabled
class C:
__attr = "eggs" # mangled to _C__attr
_Outer__attr = "bacon"
@@ -3296,7 +3296,7 @@ class TestSyntaxErrors(unittest.TestCase):
class TestTypeErrors(unittest.TestCase):
def test_accepts_positional_subpatterns_0(self):
- return
+ return # disabled
class Class:
__match_args__ = ()
x = Class()
@@ -3309,7 +3309,7 @@ class TestTypeErrors(unittest.TestCase):
self.assertIs(z, None)
def test_accepts_positional_subpatterns_1(self):
- return
+ return # disabled
x = range(10)
y = None
with self.assertRaises(TypeError):
@@ -3320,7 +3320,7 @@ class TestTypeErrors(unittest.TestCase):
self.assertIs(y, None)
def test_got_multiple_subpatterns_for_attribute_0(self):
- return
+ return # disabled
class Class:
__match_args__ = ("a", "a")
a = None
@@ -3335,7 +3335,7 @@ class TestTypeErrors(unittest.TestCase):
self.assertIs(z, None)
def test_got_multiple_subpatterns_for_attribute_1(self):
- return
+ return # disabled
class Class:
__match_args__ = ("a",)
a = None
@@ -3350,7 +3350,7 @@ class TestTypeErrors(unittest.TestCase):
self.assertIs(z, None)
def test_match_args_elements_must_be_strings(self):
- return
+ return # disabled
class Class:
__match_args__ = (None,)
x = Class()
@@ -3363,7 +3363,7 @@ class TestTypeErrors(unittest.TestCase):
self.assertIs(z, None)
def test_match_args_must_be_a_tuple_0(self):
- return
+ return # disabled
class Class:
__match_args__ = None
x = Class()
@@ -3376,7 +3376,7 @@ class TestTypeErrors(unittest.TestCase):
self.assertIs(z, None)
def test_match_args_must_be_a_tuple_1(self):
- return
+ return # disabled
class Class:
__match_args__ = "XYZ"
x = Class()
@@ -3389,7 +3389,7 @@ class TestTypeErrors(unittest.TestCase):
self.assertIs(z, None)
def test_match_args_must_be_a_tuple_2(self):
- return
+ return # disabled
class Class:
__match_args__ = ["spam", "eggs"]
spam = 0
@@ -3408,7 +3408,7 @@ class TestTypeErrors(unittest.TestCase):
class TestValueErrors(unittest.TestCase):
def test_mapping_pattern_checks_duplicate_key_1(self):
- return
+ return # disabled
class Keys:
KEY = "a"
x = {"a": 0, "b": 1}