(self)
| 53 | return results |
| 54 | |
| 55 | def test_cprofile(self): |
| 56 | results = self.do_profiling() |
| 57 | expected = self.get_expected_output() |
| 58 | self.assertEqual(results[0], 1000) |
| 59 | fail = [] |
| 60 | for i, method in enumerate(self.methodnames): |
| 61 | a = expected[method] |
| 62 | b = results[i+1] |
| 63 | if a != b: |
| 64 | fail.append(f"\nStats.{method} output for " |
| 65 | f"{self.profilerclass.__name__} " |
| 66 | "does not fit expectation:") |
| 67 | fail.extend(unified_diff(a.split('\n'), b.split('\n'), |
| 68 | lineterm="")) |
| 69 | if fail: |
| 70 | self.fail("\n".join(fail)) |
| 71 | |
| 72 | def test_calling_conventions(self): |
| 73 | # Issue #5330: profile and cProfile wouldn't report C functions called |
nothing calls this directly
no test coverage detected