(self)
| 171 | @unittest.skipIf(os.environ.get('PYTHON_UOPS_OPTIMIZE') == '0', |
| 172 | "Line counts differ when JIT optimizer is disabled") |
| 173 | def test_trace_func_generator(self): |
| 174 | self.tracer.runfunc(traced_func_calling_generator) |
| 175 | |
| 176 | firstlineno_calling = get_firstlineno(traced_func_calling_generator) |
| 177 | firstlineno_gen = get_firstlineno(traced_func_generator) |
| 178 | expected = { |
| 179 | (self.my_py_filename, firstlineno_calling + 1): 1, |
| 180 | (self.my_py_filename, firstlineno_calling + 2): 11, |
| 181 | (self.my_py_filename, firstlineno_calling + 3): 10, |
| 182 | (self.my_py_filename, firstlineno_gen + 1): 1, |
| 183 | (self.my_py_filename, firstlineno_gen + 2): 11, |
| 184 | (self.my_py_filename, firstlineno_gen + 3): 10, |
| 185 | } |
| 186 | self.assertEqual(self.tracer.results().counts, expected) |
| 187 | |
| 188 | def test_trace_list_comprehension(self): |
| 189 | self.tracer.runfunc(traced_caller_list_comprehension) |
nothing calls this directly
no test coverage detected