MCPcopy Create free account
hub / github.com/Persper/code-analytics / assert_graph_match_history

Function assert_graph_match_history

test/test_graphs/test_analyzer_js.py:36–45  ·  view source on GitHub ↗
(az: Analyzer)

Source from the content-addressed store, hash-verified

34
35
36def assert_graph_match_history(az: Analyzer):
37 # total edits data stored in the graph should match az.history
38 g = az.graph_server.get_graph()
39 for fid in g.nodes():
40 print(fid)
41 total_edits = 0
42 for sha in az.history:
43 if fid in az.history[sha]:
44 total_edits += az.history[sha][fid]
45 assert(total_edits == g.node[fid]['num_lines'])
46
47
48def test_az(az: Analyzer):

Callers

nothing calls this directly

Calls 2

nodesMethod · 0.80
get_graphMethod · 0.45

Tested by

no test coverage detected