(az: Analyzer)
| 34 | |
| 35 | |
| 36 | def 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 | |
| 48 | def test_az(az: Analyzer): |