(self)
| 133 | 'calls') |
| 134 | |
| 135 | def test_get_stats_profile(self): |
| 136 | def pass1(): pass |
| 137 | def pass2(): pass |
| 138 | def pass3(): pass |
| 139 | |
| 140 | pr = cProfile.Profile() |
| 141 | pr.enable() |
| 142 | pass1() |
| 143 | pass2() |
| 144 | pass3() |
| 145 | pr.create_stats() |
| 146 | ps = pstats.Stats(pr) |
| 147 | |
| 148 | stats_profile = ps.get_stats_profile() |
| 149 | funcs_called = set(stats_profile.func_profiles.keys()) |
| 150 | self.assertIn('pass1', funcs_called) |
| 151 | self.assertIn('pass2', funcs_called) |
| 152 | self.assertIn('pass3', funcs_called) |
| 153 | |
| 154 | def test_SortKey_enum(self): |
| 155 | self.assertEqual(SortKey.FILENAME, 'filename') |
nothing calls this directly
no test coverage detected