(self)
| 411 | # is done by manual inspection of the output |
| 412 | |
| 413 | def test_for_iter_tuple(self): |
| 414 | def testfunc(a): |
| 415 | total = 0 |
| 416 | for i in a: |
| 417 | total += i |
| 418 | return total |
| 419 | |
| 420 | a = tuple(range(TIER2_THRESHOLD)) |
| 421 | total = testfunc(a) |
| 422 | self.assertEqual(total, sum(a)) |
| 423 | |
| 424 | ex = get_first_executor(testfunc) |
| 425 | self.assertIsNotNone(ex) |
| 426 | # for i, (opname, oparg) in enumerate(ex): |
| 427 | # print(f"{i:4d}: {opname:<20s} {oparg:3d}") |
| 428 | uops = get_opnames(ex) |
| 429 | self.assertIn("_GUARD_NOT_EXHAUSTED_TUPLE", uops) |
| 430 | # Verification that the jump goes past END_FOR |
| 431 | # is done by manual inspection of the output |
| 432 | |
| 433 | def test_list_edge_case(self): |
| 434 | def testfunc(it): |
nothing calls this directly
no test coverage detected