MCPcopy Create free account
hub / github.com/scottrogowski/code2flow / assert_eq

Function assert_eq

tests/test_graphs.py:33–56  ·  view source on GitHub ↗
(seq_a, seq_b)

Source from the content-addressed store, hash-verified

31
32
33def assert_eq(seq_a, seq_b):
34 try:
35 assert seq_a == seq_b
36 except AssertionError:
37 print("generated", file=sys.stderr)
38 for el in seq_a:
39 print(_edge(el), file=sys.stderr)
40 print("expected", file=sys.stderr)
41 for el in seq_b:
42 print(_edge(el), file=sys.stderr)
43
44 extra = seq_a - seq_b
45 missing = seq_b - seq_a
46 if extra:
47 print("extra", file=sys.stderr)
48 for el in extra:
49 print(_edge(el), file=sys.stderr)
50 if missing:
51 print("missing", file=sys.stderr)
52 for el in missing:
53 print(_edge(el), file=sys.stderr)
54
55 sys.stderr.flush()
56 raise AssertionError()
57
58
59@pytest.mark.parametrize("test_tup", flattened_tests)

Callers 3

test_allFunction · 0.85
get_nodes_set_from_fileFunction · 0.85
get_edges_set_from_fileFunction · 0.85

Calls 1

_edgeFunction · 0.85

Tested by

no test coverage detected