(self)
| 308 | @unittest.skipIf(hasattr(sys, 'gettrace') and sys.gettrace(), |
| 309 | 'pre-existing trace function throws off measurements') |
| 310 | def test_inst_method_calling(self): |
| 311 | obj = TracedClass(20) |
| 312 | self.tracer.runfunc(obj.inst_method_calling, 1) |
| 313 | |
| 314 | expected = { |
| 315 | self.filemod + ('TracedClass.inst_method_calling',): 1, |
| 316 | self.filemod + ('TracedClass.inst_method_linear',): 1, |
| 317 | self.filemod + ('traced_func_linear',): 1, |
| 318 | } |
| 319 | self.assertEqual(self.tracer.results().calledfuncs, expected) |
| 320 | |
| 321 | def test_traced_decorated_function(self): |
| 322 | self.tracer.runfunc(traced_decorated_function) |
nothing calls this directly
no test coverage detected