(func)
| 1497 | def test_co_branches(self): |
| 1498 | |
| 1499 | def get_line_branches(func): |
| 1500 | code = func.__code__ |
| 1501 | base = code.co_firstlineno |
| 1502 | return [ |
| 1503 | ( |
| 1504 | code_offset_to_line(code, src) - base, |
| 1505 | code_offset_to_line(code, left) - base, |
| 1506 | code_offset_to_line(code, right) - base |
| 1507 | ) for (src, left, right) in |
| 1508 | code.co_branches() |
| 1509 | ] |
| 1510 | |
| 1511 | def simple(x): |
| 1512 | if x: |
nothing calls this directly
no test coverage detected