8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f2f71d9 commit 1662b47Copy full SHA for 1662b47
Lib/test/test_capi/test_opt.py
@@ -1927,14 +1927,16 @@ def testfunc(n):
1927
1928
def test_get_len(self):
1929
def testfunc(n):
1930
+ x = 0
1931
a = [1, 2, 3, 4]
1932
for _ in range(n):
1933
match a:
- case [1,2]:
1934
- _ = len(a) - 1
1935
- _, ex = self._run_with_optimizer(testfunc, TIER2_THRESHOLD)
+ case [_, _, _, _]:
+ x += 1
1936
+ return x
1937
+ res, ex = self._run_with_optimizer(testfunc, TIER2_THRESHOLD)
1938
+ self.assertEqual(res, TIER2_THRESHOLD)
1939
uops = get_opnames(ex)
- self.assertNotIn("_GUARD_NOS_INT", uops)
1940
self.assertNotIn("_GUARD_TOS_INT", uops)
1941
self.assertIn("_GET_LEN", uops)
1942
0 commit comments