Skip to content

Commit 0f6c12b

Browse files
Improve test
Co-authored-by: Brandt Bucher <[email protected]>
1 parent 8a0152f commit 0f6c12b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Lib/test/test_capi/test_opt.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1769,12 +1769,13 @@ def testfunc(n):
17691769

17701770
def test_call_type_1(self):
17711771
def testfunc(n):
1772+
x = 0
17721773
for _ in range(n):
1773-
x = type(42)
1774+
x += type(42) is int
17741775
return x
17751776

17761777
res, ex = self._run_with_optimizer(testfunc, TIER2_THRESHOLD)
1777-
self.assertEqual(res, int)
1778+
self.assertEqual(res, TIER2_THRESHOLD)
17781779
self.assertIsNotNone(ex)
17791780
uops = get_opnames(ex)
17801781
self.assertIn("_CALL_TYPE_1", uops)

0 commit comments

Comments
 (0)