Verify the GCSuspectsCollector propagation and outputs against test data. Args: outputs: List of OutputLines object simulating the lines returned by the GCMole plugin in drop-callees mode. Each output lines object represents one plugin invocation. expected_gc
(self, outputs, expected_gc, expected_gc_caused)
| 206 | return collector |
| 207 | |
| 208 | def check(self, outputs, expected_gc, expected_gc_caused): |
| 209 | """Verify the GCSuspectsCollector propagation and outputs against test |
| 210 | data. |
| 211 | |
| 212 | Args: |
| 213 | outputs: List of OutputLines object simulating the lines returned by |
| 214 | the GCMole plugin in drop-callees mode. Each output lines object |
| 215 | represents one plugin invocation. |
| 216 | expected_gc: Mapping as expected by GCSuspectsCollector.gc. |
| 217 | expected_gc_caused: Mapping as expected by GCSuspectsCollector.gc_caused. |
| 218 | """ |
| 219 | collector = self.create_collector(outputs) |
| 220 | self.assertDictEqual(collector.gc, expected_gc) |
| 221 | self.assertDictEqual(collector.gc_caused, expected_gc_caused) |
| 222 | |
| 223 | def testNoGC(self): |
| 224 | self.check( |
no test coverage detected