MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / check

Function check

tests_python/test_smart_step_into_bytecode.py:20–39  ·  view source on GitHub ↗
(found, expected)

Source from the content-addressed store, hash-verified

18
19
20def 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
42def collect_smart_step_into_variants(*args, **kwargs):

Calls

no outgoing calls

Tested by

no test coverage detected