(self)
| 133 | return call_graph |
| 134 | |
| 135 | def testCallGraph(self): |
| 136 | call_graph = self.create_callgraph(OutputLines()) |
| 137 | self.assertDictEqual(call_graph.funcs, {}) |
| 138 | |
| 139 | call_graph = self.create_callgraph(OutputLines('A →')) |
| 140 | self.assertDictEqual(call_graph.funcs, {'A': set()}) |
| 141 | |
| 142 | call_graph = self.create_callgraph(OutputLines('A → B')) |
| 143 | self.assertDictEqual(call_graph.funcs, {'A': set(), 'B': set('A')}) |
| 144 | |
| 145 | call_graph = self.create_callgraph( |
| 146 | OutputLines('A → B C', 'B → C D', 'D →')) |
| 147 | self.assertDictEqual( |
| 148 | call_graph.funcs, |
| 149 | {'A': set(), 'B': set('A'), 'C': set(['A', 'B']), 'D': set('B')}) |
| 150 | |
| 151 | call_graph = self.create_callgraph( |
| 152 | OutputLines('B → C D', 'D →'), OutputLines('A → B C')) |
| 153 | self.assertDictEqual( |
| 154 | call_graph.funcs, |
| 155 | {'A': set(), 'B': set('A'), 'C': set(['A', 'B']), 'D': set('B')}) |
| 156 | |
| 157 | def testCallGraphMerge(self): |
| 158 | """Test serializing, deserializing and merging call graphs.""" |
nothing calls this directly
no test coverage detected