(found, expected)
| 18 | |
| 19 | |
| 20 | def check(found, expected): |
| 21 | assert len(found) == len(expected), '%s != %s' % (found, expected) |
| 22 | |
| 23 | last_offset = -1 |
| 24 | for f, e in zip(found, expected): |
| 25 | try: |
| 26 | if isinstance(e.name, (list, tuple, set)): |
| 27 | assert f.name in e.name |
| 28 | else: |
| 29 | assert f.name == e.name |
| 30 | assert f.is_visited == e.is_visited |
| 31 | assert f.line == e.line |
| 32 | assert f.call_order == e.call_order |
| 33 | except AssertionError as exc: |
| 34 | raise AssertionError('%s\nError with: %s - %s' % (exc, f, e)) |
| 35 | |
| 36 | # We can't check the offset because it may be different among different python versions |
| 37 | # so, just check that it's always in order. |
| 38 | assert f.offset > last_offset |
| 39 | last_offset = f.offset |
| 40 | |
| 41 | |
| 42 | def collect_smart_step_into_variants(*args, **kwargs): |
no outgoing calls
no test coverage detected