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