(self)
| 3395 | |
| 3396 | class TestSourceLocations(unittest.TestCase): |
| 3397 | def test_jump_threading(self): |
| 3398 | # See gh-123048 |
| 3399 | def f(): |
| 3400 | x = 0 |
| 3401 | v = 1 |
| 3402 | match v: |
| 3403 | case 1: |
| 3404 | if x < 0: |
| 3405 | x = 1 |
| 3406 | case 2: |
| 3407 | if x < 0: |
| 3408 | x = 1 |
| 3409 | x += 1 |
| 3410 | |
| 3411 | for inst in dis.get_instructions(f): |
| 3412 | if inst.opcode in dis.hasjump: |
| 3413 | self.assertIsNotNone(inst.positions.lineno, "jump without location") |
| 3414 | |
| 3415 | class TestTracing(unittest.TestCase): |
| 3416 |
nothing calls this directly
no test coverage detected